showSnackBar function
Description
: showSnackBar without BuildContext
Parameters
:
String msg
: Message to display
Example Usage
:
showSnackBar(msg: "Snack bar");
Implementation
void showSnackBar(String msg) {
try {
final SnackBar snackBar = SnackBar(content: Text(msg));
snackbarKey.currentState?.showSnackBar(snackBar);
} catch (e, stackTrace) {
message.throwError(e: e, stackTrace: stackTrace);
}
}