CustomSnackBar class
A helper class that provides a method to display a custom-styled SnackBar.
The CustomSnackBar class adapts its appearance based on the current theme (light or dark) and the selected SnackBarVibe. It supports optional parameters for further customization such as background color, text style, icon, content widget, dismiss direction, shape, and duration.
Constructors
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
-
showSnackBar(
BuildContext context, {required String content, SnackBarVibe vibe = SnackBarVibe.none, Color? backgroundColor, TextStyle? textStyle, Widget? icon, Widget? prefixIcon, Widget? contentWidget, DismissDirection? dismissDirection, ShapeBorder? shape, Duration? duration, EdgeInsets? margin, bool usePrimaryColor = false, bool? showCloseIcon, EdgeInsets? padding, double? width, Color? borderColor}) → void -
Displays a custom SnackBar with the specified
contentandvibe.