showSnackInformation static method
void
showSnackInformation(
- String message,
- Color color, {
- required BuildContext context,
- int seconds = 3,
Implementation
static void showSnackInformation(
String message,
Color color, {
required BuildContext context,
int seconds = 3,
}) {
FocusScope.of(context).requestFocus(
FocusNode(),
);
ScaffoldMessenger.of(context).removeCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
message,
style: const TextStyle(color: Colors.white),
),
backgroundColor: color,
duration: Duration(
seconds: seconds,
),
),
);
}