update
This commit is contained in:
parent
cf2ce36f87
commit
50d2cba7f2
9 changed files with 156 additions and 83 deletions
13
lib/widgets/snackbar_widget.dart
Normal file
13
lib/widgets/snackbar_widget.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
void showNotification(BuildContext context, String text, bool isPositive) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(text),
|
||||
backgroundColor: isPositive ? const Color.fromRGBO(37, 106, 32, 1) : const Color.fromRGBO(188, 59, 50, 1),
|
||||
elevation: 4.0,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
duration: const Duration(seconds: 3),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue