Skip to content

Commit

Permalink
Oops… dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k committed Jan 26, 2025
1 parent 81d1b99 commit 0dab358
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions packages/smooth_app/lib/widgets/smooth_explanation_banner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ class ExplanationBodyInfo extends StatelessWidget {
Widget build(BuildContext context) {
final SmoothColorsThemeExtension extension =
context.extension<SmoothColorsThemeExtension>();
final bool lightTheme = context.lightTheme();

return ColoredBox(
color: extension.primaryMedium,
color: lightTheme ? extension.primaryMedium : extension.primaryTone,
child: ClipRect(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
Expand All @@ -162,7 +163,9 @@ class ExplanationBodyInfo extends StatelessWidget {
offset: const Offset(-17.0, 09.0),
child: icons.Info(
size: 55.0,
color: extension.primaryNormal,
color: lightTheme
? extension.primaryNormal
: extension.primaryMedium,
),
),
),
Expand All @@ -174,7 +177,12 @@ class ExplanationBodyInfo extends StatelessWidget {
top: MEDIUM_SPACE,
bottom: MEDIUM_SPACE,
),
child: TextWithBoldParts(text: text),
child: TextWithBoldParts(
text: text,
textStyle: TextStyle(
color: lightTheme ? extension.primaryDark : Colors.white,
),
),
),
),
],
Expand Down Expand Up @@ -357,7 +365,9 @@ class _ExplanationBodyListItem extends StatelessWidget {
child: Text(
explanation!,
style: TextStyle(
color: extension.primaryDark,
color: lightTheme
? extension.primaryDark
: extension.primaryLight,
fontWeight: FontWeight.bold,
),
),
Expand All @@ -368,15 +378,18 @@ class _ExplanationBodyListItem extends StatelessWidget {
decoration: BoxDecoration(
color: lightTheme
? extension.primaryLight
: extension.primaryLight,
: extension.primaryMedium,
borderRadius: ROUNDED_BORDER_RADIUS,
),
child: Padding(
padding: const EdgeInsetsDirectional.symmetric(
horizontal: MEDIUM_SPACE,
vertical: BALANCED_SPACE,
),
child: TextWithBoldParts(text: example),
child: TextWithBoldParts(
text: example,
textStyle: const TextStyle(color: Colors.black),
),
),
)
],
Expand Down

0 comments on commit 0dab358

Please sign in to comment.