snackbar static method

dynamic snackbar(
  1. dynamic context, {
  2. required String text,
  3. bool? isFloating = false,
})

Implementation

static snackbar(context, {required String text, bool? isFloating = false}) {
  ScaffoldMessenger.of(context).showSnackBar(SnackBar(
      behavior: isFloating == true ? SnackBarBehavior.floating : null,
      // backgroundColor: purpleColor,
      content: Text(
        text,
        style: const TextStyle(fontWeight: FontWeight.w700),
      )));
}