showScaffoldMessenger static method
void
showScaffoldMessenger(
- BuildContext context, {
- required String text,
- required TextStyle? textStyle,
- 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,
),
));
}