feat: improve app theming code and add Material You (#58)

This commit is contained in:
Alberto Ponces
2022-09-05 03:32:36 +01:00
committed by GitHub
parent 35d334ea1f
commit 5404208562
44 changed files with 627 additions and 854 deletions

View File

@@ -12,8 +12,6 @@ class CustomSwitch extends StatelessWidget {
@override
Widget build(BuildContext context) {
Color? activeColor = Theme.of(context).colorScheme.tertiary;
Color? inactiveColor = Theme.of(context).colorScheme.secondary;
return GestureDetector(
onTap: () => onChanged(!value),
child: SizedBox(
@@ -30,7 +28,9 @@ class CustomSwitch extends StatelessWidget {
borderRadius: const BorderRadius.all(
Radius.circular(25.0),
),
color: !value ? activeColor : inactiveColor,
color: value
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.secondary,
),
),
AnimatedAlign(