From 9b119d9170b1b117d6b1d42221f28b74ba0bbad5 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sun, 19 May 2024 20:37:09 +0200 Subject: [PATCH] fixed ruler slider ticks color --- lib/screens/shared/ruler_slider/widget_slider_ruler.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/screens/shared/ruler_slider/widget_slider_ruler.dart b/lib/screens/shared/ruler_slider/widget_slider_ruler.dart index 77b4dce..9932ef2 100644 --- a/lib/screens/shared/ruler_slider/widget_slider_ruler.dart +++ b/lib/screens/shared/ruler_slider/widget_slider_ruler.dart @@ -30,7 +30,7 @@ class RulerSlider extends StatelessWidget { children: [ Text( valueAdapter(value), - style: Theme.of(context).textTheme.labelLarge, + style: Theme.of(context).textTheme.labelLarge!.copyWith(color: Theme.of(context).colorScheme.onBackground), ), const SizedBox(height: Dimens.grid4), Expanded( @@ -78,6 +78,7 @@ class _Ruler extends StatelessWidget { @override Widget build(BuildContext context) { final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!; + final itemsColor = Theme.of(context).colorScheme.onBackground; return LayoutBuilder( builder: (context, constraints) { final bool showAllMainTicks = @@ -103,11 +104,11 @@ class _Ruler extends StatelessWidget { if (showValue) Text( rulerValueAdapter(index / 2 + min), - style: Theme.of(context).textTheme.bodySmall, + style: Theme.of(context).textTheme.bodySmall!.copyWith(color: itemsColor), ), const SizedBox(width: Dimens.grid4), ColoredBox( - color: Theme.of(context).colorScheme.primaryContainer, + color: itemsColor, child: SizedBox( height: 1, width: isMainTick ? Dimens.grid8 : Dimens.grid4,