snackbar method
Implementation
void snackbar(
String text, {
String? snackbarActionLabel,
Function()? action,
}) {
final snackBar = SnackBar(
content: Text(text),
action: snackbarActionLabel == null
? null
: SnackBarAction(
label: snackbarActionLabel,
onPressed: () {
if (action != null) action();
}),
);
rootScaffoldMessengerKey.currentState!.showSnackBar(snackBar);
}