showScaffoldMessenger static method

void showScaffoldMessenger(
  1. BuildContext context, {
  2. required String text,
  3. required TextStyle? textStyle,
  4. required Color? bgColor,
})

showScaffoldMessenger Show scaffold messenger with message

  • Param text Text to show
  • Param textSytle Text style
  • Param bgColor Background color of scaffold

Implementation

static void showScaffoldMessenger(BuildContext context,
    {required String text,
    required TextStyle? textStyle,
    required Color? bgColor}) {
  ScaffoldMessenger.of(context).showSnackBar(SnackBar(
    duration: const Duration(milliseconds: 300),
    backgroundColor: bgColor,
    content: BaseText(
      text,
      style: textStyle,
    ),
  ));
}