snack static method
void
snack({
- required BuildContext context,
- required Widget content,
- SnackBarAction? action,
- Duration? duration,
- Color? backgroundColor,
- double elevation = 0,
Implementation
static void snack({
required BuildContext context,
required Widget content,
SnackBarAction? action,
Duration? duration,
Color? backgroundColor,
double elevation = 0
}){
logNUI("NUIApp", "Snack with duration : ${duration?.inSeconds}");
final snackBar = SnackBar(
backgroundColor: backgroundColor,
content: content,
action: action,
elevation: elevation ?? 3,
duration: duration ?? Duration(seconds: 3),
);
// try{
// Scaffold.of(context).showSnackBar(snackBar);
// } catch(e){
// log("NUIApp -> Failed to show snack bar with exception : " + e.toString());
// }
}