Skip to content

Commit

Permalink
switch theme impl
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed Mar 25, 2024
1 parent 991d096 commit 23833a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/theme_data/default.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ class Default_Theme {
selectionColor: accentColor2,
selectionHandleColor: accentColor2,
),
switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.all(primaryColor1),
trackOutlineColor: MaterialStateProperty.resolveWith((states) =>
states.contains(MaterialState.selected)
? accentColor1
: accentColor2),
trackColor: MaterialStateProperty.resolveWith((states) =>
states.contains(MaterialState.selected)
? accentColor1
: primaryColor2.withOpacity(0))),
);
}

0 comments on commit 23833a2

Please sign in to comment.