showErrorSnackBar method

void showErrorSnackBar(
  1. BuildContext context,
  2. String message
)

Implementation

void showErrorSnackBar(BuildContext context, String message) {
  vm.idle();
  messenger(context).hideCurrentSnackBar();
  messenger(context).showSnackBar(
    SnackBar(
      backgroundColor: Theme.of(context).colorScheme.error,
      duration: const Duration(seconds: 4),
      content: Text(message),
      showCloseIcon: true,
    ),
  );
}