mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Snack bars for barcode actions
This commit is contained in:
parent
0773b2e70d
commit
b7e9c06dfa
4 changed files with 118 additions and 91 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue