error static method

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

Shows an error toast (red background with error icon).

Implementation

static void error(BuildContext context, String message) {
  show(
    context,
    message,
    backgroundColor: Colors.red,
    textColor: Colors.white,
    icon: Icons.error,
    duration: const Duration(seconds: 3),
  );
}