+Add quantity field to ingredients

+Clear list now requires confirmation
+Confirm / Cancel buttons are now coloured
This commit is contained in:
Alexander Laevens
2022-12-07 02:13:34 -07:00
parent 31c4505e49
commit 4d0388b262
20 changed files with 396 additions and 83 deletions

View File

@@ -38,3 +38,28 @@ class MyBehavior extends ScrollBehavior {
return child;
}
}
ButtonStyle positiveButtonStyle(BuildContext context) {
Brightness brightness = Theme.of(context).colorScheme.brightness;
if (brightness == Brightness.dark) {
return ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.green[200]),
foregroundColor: MaterialStatePropertyAll(Colors.green[900]),
);
} else {
return ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.green[900]),
foregroundColor: const MaterialStatePropertyAll(Colors.white),
);
}
}
ButtonStyle negativeButtonStyle(BuildContext context) {
return ButtonStyle(
backgroundColor:
MaterialStatePropertyAll(Theme.of(context).colorScheme.error),
foregroundColor:
MaterialStatePropertyAll(Theme.of(context).colorScheme.onError),
);
}