createError static method

ToastMessageBar createError({
  1. required String message,
  2. String? title,
  3. Duration duration = const Duration(seconds: 3),
})

Implementation

static ToastMessageBar createError(
    {required String message,
    String? title,
    Duration duration = const Duration(seconds: 3)}) {
  return ToastMessageBar(
    title: title,
    message: message,
    icon: Icon(
      Icons.warning,
      size: 28.0,
      color: Colors.red[300],
    ),
    leftBarIndicatorColor: Colors.red[300],
    duration: duration,
  );
}