Skip to content

Commit

Permalink
Better logging and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed May 6, 2024
1 parent 6f87c35 commit daacf0b
Show file tree
Hide file tree
Showing 39 changed files with 539 additions and 312 deletions.
121 changes: 121 additions & 0 deletions coverage/lcov.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
SF:lib/helpers/section_tag.dart
DA:2,0
DA:11,1
DA:12,1
DA:13,2
DA:16,1
DA:17,2
DA:20,1
DA:21,1
DA:22,1
DA:30,3
DA:31,1
DA:34,1
DA:38,1
DA:41,1
DA:42,2
DA:43,2
DA:46,1
DA:47,1
DA:54,3
DA:55,1
DA:57,2
DA:61,1
DA:62,1
LF:23
LH:22
end_of_record
SF:lib/helpers/utils.dart
DA:7,1
DA:8,2
DA:10,1
DA:12,1
DA:16,1
DA:17,1
DA:18,1
DA:19,1
DA:22,0
DA:23,0
DA:24,0
DA:29,0
DA:30,0
DA:32,0
DA:33,0
DA:38,0
DA:39,0
DA:41,0
DA:42,0
DA:43,0
DA:47,1
DA:51,1
DA:52,1
DA:54,1
DA:55,1
DA:57,2
DA:58,1
DA:59,1
DA:63,2
DA:64,1
DA:65,1
DA:76,0
DA:77,0
DA:79,0
DA:80,0
DA:82,0
DA:84,0
DA:86,0
DA:88,0
DA:89,0
DA:92,0
DA:93,0
DA:95,0
DA:97,0
DA:98,0
DA:111,1
DA:120,3
DA:121,2
DA:123,2
DA:127,4
DA:132,1
DA:136,2
DA:137,3
DA:138,3
LF:54
LH:28
end_of_record
SF:lib/helpers/syntax_highlighter.dart
DA:6,0
DA:8,0
DA:10,0
DA:16,0
DA:22,0
DA:23,0
DA:24,0
DA:28,0
DA:29,0
DA:30,0
DA:32,0
DA:36,0
DA:37,0
DA:38,0
DA:42,1
DA:44,1
DA:45,1
DA:48,1
DA:51,1
DA:57,1
DA:60,2
DA:61,1
DA:62,1
DA:66,1
DA:68,1
DA:69,3
DA:70,3
DA:73,2
DA:74,1
DA:78,2
DA:83,1
DA:84,1
LF:32
LH:18
end_of_record
103 changes: 52 additions & 51 deletions example/lib/src/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,94 +4,95 @@ import 'package:superdeck/superdeck.dart';

VariantAttribute get radStyle {
return const SlideVariant('rad')(
$.h1.textStyle.as(GoogleFonts.poppins()),
$.h1.textStyle.fontSize(140),
$.code.decoration.border.all(
$deck.h1.textStyle.as(GoogleFonts.poppins()),
$deck.h1.textStyle.fontSize(140),
$deck.code.decoration.border.all(
color: Colors.red,
width: 3,
),
$.code.decoration(
$deck.code.decoration(
color: Colors.black54,
),
$.code.padding.all(40),
$deck.code.padding.all(40),

$.outerContainer.margin.all(60),
$deck.outerContainer.margin.all(60),

$.innerContainer.borderRadius(25),
$.innerContainer.shadow(
$deck.innerContainer.borderRadius(25),
$deck.innerContainer.shadow(
blurRadius: 0,
spreadRadius: 10,
color: Colors.red.withOpacity(1),
),
$.innerContainer.gradient.radial(
$deck.innerContainer.gradient.radial(
stops: [0.0, 1.0],
radius: 0.7,
colors: [Colors.purple, Colors.deepPurple],
),

// Events
onMouseHover((event) {
final position = event.position;
$on.hover.event((e) {
if (e == null) return const Style.empty();
final position = e.position;
final dx = position.x * 10;
final dy = position.y * 10;

return Style(
$.innerContainer.transform(_transformMatrix(position)),
$.innerContainer.shadow.offset(dx, dy),
$.innerContainer.gradient.radial(
$deck.innerContainer.transform(_transformMatrix(position)),
$deck.innerContainer.shadow.offset(dx, dy),
$deck.innerContainer.gradient.radial(
center: position,
),
);
}),

(onPressed | onLongPressed)(
$.innerContainer.shadow(
($on.press | $on.longPress)(
$deck.innerContainer.shadow(
blurRadius: 5,
spreadRadius: 1,
offset: Offset.zero,
color: Colors.purpleAccent,
),
$.innerContainer.border.all(color: Colors.white, width: 1),
$.innerContainer.gradient.radial
$deck.innerContainer.border.all(color: Colors.white, width: 1),
$deck.innerContainer.gradient.radial
.colors([Colors.purpleAccent, Colors.purpleAccent]),
),
);
}

VariantAttribute get customStyle {
return const SlideVariant('custom')(
$.textStyle.as(GoogleFonts.poppins()),
$.h1.textStyle.as(GoogleFonts.smooch()),
$.h1.textStyle.fontSize(200),
$.h1.textStyle.height(0),
$.h1.textStyle.shadow(
$deck.textStyle.as(GoogleFonts.poppins()),
$deck.h1.textStyle.as(GoogleFonts.smooch()),
$deck.h1.textStyle.fontSize(200),
$deck.h1.textStyle.height(0),
$deck.h1.textStyle.shadow(
color: Colors.deepOrange,
blurRadius: 20,
),
$.h2.textStyle.fontSize(36),
$.contentContainer.borderRadius(25),
$.innerContainer.gradient.linear(
$deck.h2.textStyle.fontSize(36),
$deck.contentContainer.borderRadius(25),
$deck.innerContainer.gradient.linear(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.black.withOpacity(0.5),
Colors.deepPurple.withOpacity(0.9),
],
),
$.contentContainer.padding.vertical(0),
$.outerContainer.padding(40),
$.outerContainer.gradient.linear(
$deck.contentContainer.padding.vertical(0),
$deck.outerContainer.padding(40),
$deck.outerContainer.gradient.linear(
colors: [
Colors.red,
Colors.redAccent,
],
),
$.innerContainer.borderRadius(25),
$.innerContainer.border.all(
$deck.innerContainer.borderRadius(25),
$deck.innerContainer.border.all(
color: Colors.deepOrange,
width: 4,
),
$.innerContainer.shadow(
$deck.innerContainer.shadow(
color: Colors.black.withOpacity(0.4),
blurRadius: 20,
spreadRadius: 5,
Expand All @@ -101,9 +102,9 @@ VariantAttribute get customStyle {

VariantAttribute get coverStyle {
return const SlideVariant('cover')(
$.h1.textStyle.as(GoogleFonts.poppins()),
$.h1.textStyle.fontSize(100),
$.contentContainer.gradient.linear(
$deck.h1.textStyle.as(GoogleFonts.poppins()),
$deck.h1.textStyle.fontSize(100),
$deck.contentContainer.gradient.linear(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Expand All @@ -116,15 +117,15 @@ VariantAttribute get coverStyle {

VariantAttribute get announcementStyle {
return const SlideVariant('announcement')(
$.textStyle.height(0.6),
$.h1.textStyle.fontSize(140),
$.h1.textStyle.bold(),
$.h1.textStyle.color(Colors.yellow),
$.h2.textStyle.fontSize(140),
$.h3.textStyle.fontSize(60),
$.h3.textStyle.color(Colors.white),
$.h3.textStyle.fontWeight(FontWeight.w100),
$.contentContainer.gradient.linear(
$deck.textStyle.height(0.6),
$deck.h1.textStyle.fontSize(140),
$deck.h1.textStyle.bold(),
$deck.h1.textStyle.color(Colors.yellow),
$deck.h2.textStyle.fontSize(140),
$deck.h3.textStyle.fontSize(60),
$deck.h3.textStyle.color(Colors.white),
$deck.h3.textStyle.fontWeight(FontWeight.w100),
$deck.contentContainer.gradient.linear(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Expand All @@ -137,20 +138,20 @@ VariantAttribute get announcementStyle {

VariantAttribute get quoteStyle {
return const SlideVariant('quote')(
$.blockquote.textStyle.as(GoogleFonts.notoSerif()),
$.blockquote.decoration.border.left(
$deck.blockquote.textStyle.as(GoogleFonts.notoSerif()),
$deck.blockquote.decoration.border.left(
width: 4,
color: Colors.red,
),
$.paragraph.textStyle.fontSize(32),
$.h6.textStyle.as(GoogleFonts.notoSerif()),
$.h6.textStyle.fontSize(20),
$deck.paragraph.textStyle.fontSize(32),
$deck.h6.textStyle.as(GoogleFonts.notoSerif()),
$deck.h6.textStyle.fontSize(20),
);
}

VariantAttribute get showSectionsStyle {
return const SlideVariant('show_sections')(
$.contentContainer.border.all(
$deck.contentContainer.border.all(
color: Colors.blue,
width: 2,
),
Expand All @@ -159,7 +160,7 @@ VariantAttribute get showSectionsStyle {

Style get style {
return Style(
$.textStyle.as(GoogleFonts.poppins()),
$deck.textStyle.as(GoogleFonts.poppins()),
customStyle,
quoteStyle,
showSectionsStyle,
Expand Down
Loading

0 comments on commit daacf0b

Please sign in to comment.