showErrorSnackbar function
howErrorSnackbar
Implementation
void showErrorSnackbar(BuildContext ctx,
[String? msg, Color color = Colors.red]) {
ScaffoldMessenger.of(ctx).showSnackBar(
SnackBar(
backgroundColor: color,
content: Text(
msg ?? UserFeedBackTexts.getErrorMessage(),
style: Theme.of(ctx).textTheme.bodyText2!.copyWith(color: Colors.white),
),
duration: const Duration(seconds: kShortSnackBarDuration),
),
);
return;
}