Skip to content

Commit

Permalink
Fix slider and switch themes not changing
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanSarwar45 committed Dec 12, 2023
1 parent 5dcb17b commit ca986f9
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions lib/theme/utils/color_scheme.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:clock_app/settings/data/settings_schema.dart';
import 'package:clock_app/theme/bottom_sheet.dart';
import 'package:clock_app/theme/popup_menu.dart';
import 'package:clock_app/theme/slider.dart';
import 'package:clock_app/theme/switch.dart';
import 'package:clock_app/theme/types/color_scheme.dart';
import 'package:clock_app/theme/input.dart';
import 'package:clock_app/theme/radio.dart';
Expand All @@ -17,18 +19,19 @@ ThemeData getThemeFromColorScheme(
.value;

return theme.copyWith(
colorScheme: getColorScheme(colorSchemeData),
scaffoldBackgroundColor: colorSchemeData.background,
cardColor: colorSchemeData.card,
radioTheme: getRadioTheme(colorSchemeData),
dialogBackgroundColor: colorSchemeData.card,
bottomSheetTheme: getBottomSheetTheme(colorSchemeData, styleTheme),
textTheme: theme.textTheme.apply(
bodyColor: colorSchemeData.onBackground,
displayColor: colorSchemeData.onBackground,
),
snackBarTheme: getSnackBarTheme(colorSchemeData, styleTheme),
inputDecorationTheme: getInputTheme(colorSchemeData, styleTheme),
popupMenuTheme: getPopupMenuTheme(colorSchemeData, styleTheme),
);
colorScheme: getColorScheme(colorSchemeData),
scaffoldBackgroundColor: colorSchemeData.background,
cardColor: colorSchemeData.card,
radioTheme: getRadioTheme(colorSchemeData),
dialogBackgroundColor: colorSchemeData.card,
bottomSheetTheme: getBottomSheetTheme(colorSchemeData, styleTheme),
textTheme: theme.textTheme.apply(
bodyColor: colorSchemeData.onBackground,
displayColor: colorSchemeData.onBackground,
),
snackBarTheme: getSnackBarTheme(colorSchemeData, styleTheme),
inputDecorationTheme: getInputTheme(colorSchemeData, styleTheme),
popupMenuTheme: getPopupMenuTheme(colorSchemeData, styleTheme),
switchTheme: getSwitchTheme(colorSchemeData),
sliderTheme: getSliderTheme(colorSchemeData));
}

0 comments on commit ca986f9

Please sign in to comment.