SnackBarUtil class

Utility class for showing styled snack bars with success/error indicators.

Provides convenience methods to display snack bars with predefined success (green) and failure (orange) colors.

Constructors

SnackBarUtil()

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 Properties

failureColor ↔ Color
Default background color for failure snack bars (dark orange).
getter/setter pair
successColor ↔ Color
Default background color for success snack bars (dark green).
getter/setter pair

Static Methods

show(BuildContext context, String message, bool success) → void
Shows a snack bar using the context's scaffold messenger.
showError(BuildContext context, String message) → void
Shows an error snack bar using the context.
showFailureWithMessenger(ScaffoldMessengerState scaffoldMessengerState, String message) → void
Shows a failure snack bar using the provided ScaffoldMessengerState.
showSuccess(BuildContext context, String message) → void
Shows a success snack bar using the context.
showSuccessWithMessenger(ScaffoldMessengerState scaffoldMessengerState, String message) → void
Shows a success snack bar using the provided ScaffoldMessengerState.
showWithMessenger(ScaffoldMessengerState scaffoldMessengerState, String message, bool success) → void
Shows a snack bar with color based on success/failure status.