feat: replace WidgetState with MaterialState

This commit is contained in:
Freek van de Ven 2024-06-07 19:45:23 +02:00
parent 3e8b46f246
commit 8cb36bb960

View file

@ -54,9 +54,9 @@ class BottomAlertDialogConfig extends InheritedWidget {
return ElevatedButton( return ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: backgroundColor:
WidgetStateProperty.all(theme.colorScheme.primary), MaterialStateProperty.all(theme.colorScheme.primary),
foregroundColor: WidgetStateProperty.all(Colors.black), foregroundColor: MaterialStateProperty.all(Colors.black),
shape: WidgetStateProperty.all( shape: MaterialStateProperty.all(
RoundedRectangleBorder( RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
side: BorderSide(color: theme.colorScheme.primary), side: BorderSide(color: theme.colorScheme.primary),
@ -69,9 +69,9 @@ class BottomAlertDialogConfig extends InheritedWidget {
case ButtonType.secondary: case ButtonType.secondary:
return ElevatedButton( return ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(Colors.white), backgroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: WidgetStateProperty.all(Colors.black), foregroundColor: MaterialStateProperty.all(Colors.black),
shape: WidgetStateProperty.all( shape: MaterialStateProperty.all(
RoundedRectangleBorder( RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
side: BorderSide(color: theme.colorScheme.primary), side: BorderSide(color: theme.colorScheme.primary),
@ -84,10 +84,10 @@ class BottomAlertDialogConfig extends InheritedWidget {
case ButtonType.tertiary: case ButtonType.tertiary:
return ElevatedButton( return ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
shadowColor: WidgetStateProperty.all(Colors.transparent), shadowColor: MaterialStateProperty.all(Colors.transparent),
backgroundColor: WidgetStateProperty.all(Colors.white), backgroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: WidgetStateProperty.all(Colors.black), foregroundColor: MaterialStateProperty.all(Colors.black),
shape: WidgetStateProperty.all( shape: MaterialStateProperty.all(
RoundedRectangleBorder( RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
side: const BorderSide(color: Colors.white), side: const BorderSide(color: Colors.white),