SnackbarKit class
A utility class for displaying customizable snackbar notifications.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clearAll(
BuildContext context) → void - Removes all queued snackbars and dismisses the current one.
-
dismiss(
BuildContext context) → void - Dismisses any currently visible snackbar.
-
error(
BuildContext context, String message, {Duration? duration, SnackBarAction? action, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows an error snackbar with an error icon.
-
info(
BuildContext context, String message, {Duration? duration, SnackBarAction? action, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows an info snackbar with an info icon.
-
normal(
BuildContext context, String message, {Duration? duration, SnackBarAction? action, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows a normal/default snackbar without a specific type.
-
show(
BuildContext context, {required String message, Color? backgroundColor, Color? textColor, IconData? icon, Duration? duration, SnackBarAction? action, SnackBarBehavior? behavior, EdgeInsets? margin, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows a custom snackbar with full control over appearance. Parameters:
-
success(
BuildContext context, String message, {Duration? duration, SnackBarAction? action, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows a success snackbar with a checkmark icon.
-
warning(
BuildContext context, String message, {Duration? duration, SnackBarAction? action, bool? showCloseButton, bool? showProgressIndicator, SnackbarPosition? position}) → void - Shows a warning snackbar with a warning icon.