snack static method

void snack({
  1. required BuildContext context,
  2. required Widget content,
  3. SnackBarAction? action,
  4. Duration? duration,
  5. Color? backgroundColor,
  6. 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());
  // }
}