CustomSnackBar constructor

CustomSnackBar({
  1. Key? key,
  2. required String message,
  3. String btnLabel = 'Ok',
  4. VoidCallback? callback,
  5. Duration duration = const Duration(seconds: 2),
})

Implementation

CustomSnackBar(
    {Key? key,
    required String message,
    String btnLabel = 'Ok',
    VoidCallback? callback,
    Duration duration = const Duration(seconds: 2)})
    : super(
          key: key,
          content: Text(message),
          duration: duration,
          action: SnackBarAction(
              label: btnLabel,
              onPressed: () {
                if (callback != null) callback();
              }));