Snack bars for barcode actions

This commit is contained in:
Oliver Walters committed 2021-02-17 08:41:17 +11:00
1 parent 0773b2e70d
commit b7e9c06dfa
4 files changed
+118 -91

No files matched your search

+10
View File
@@ -24,8 +24,18 @@ void showSnackIcon(String text, {IconData icon, Function onAction, bool success,
if (success == true) {
backgroundColor = Colors.lightGreen;
// Select an icon if we do not have an action
if (icon == null && onAction == null) {
icon = FontAwesomeIcons.checkCircle;
}
} else if (success == false) {
backgroundColor = Colors.deepOrange;
if (icon == null && onAction == null) {
icon = FontAwesomeIcons.exclamationCircle;
}
}
SnackBarAction action;