FlowsSnackBar class
FlowsSnackBar - Custom snackbar similar to GetX
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlowsSnackBar
Constructors
-
FlowsSnackBar({Key? key, String? title, String? message, Widget? titleText, Widget? messageText, Widget? icon, bool shouldIconPulse = true, double? maxWidth, EdgeInsets margin = const EdgeInsets.all(0.0), EdgeInsets padding = const EdgeInsets.all(16), double borderRadius = 0.0, Color? borderColor, double? borderWidth = 1.0, Color backgroundColor = const Color(0xFF303030), Color? leftBarIndicatorColor, List<
BoxShadow> ? boxShadows, Gradient? backgroundGradient, Widget? mainButton, OnTap? onTap, OnHover? onHover, Duration? duration, bool isDismissible = true, bool showProgressIndicator = false, AnimationController? progressIndicatorController, Color? progressIndicatorBackgroundColor, Animation<Color> ? progressIndicatorValueColor, SnackPosition snackPosition = SnackPosition.bottom, SnackStyle snackStyle = SnackStyle.floating, Curve forwardAnimationCurve = Curves.easeOutCirc, Curve reverseAnimationCurve = Curves.easeOutCirc, Duration animationDuration = const Duration(seconds: 1), double barBlur = 0.0, double overlayBlur = 0.0, Color? overlayColor = Colors.transparent, Form? userInputForm, SnackbarStatusCallback? snackbarStatus}) -
const
Properties
- animationDuration → Duration
-
Use it to speed up or slow down the animation duration
final
- backgroundColor → Color
-
Will be ignored if backgroundGradient is not null
final
- backgroundGradient → Gradient?
-
Give to FlowsSnackbar a gradient background
final
- barBlur → double
-
Default is 0.0. If different than 0.0, blurs only Snack's background
final
- borderColor → Color?
-
Adds a border to every side of Snack
final
- borderRadius → double
-
Adds a radius to all corners of Snack
final
- borderWidth → double?
-
Changes the width of the border if borderColor is specified
final
-
boxShadows
→ List<
BoxShadow> ? -
The shadows generated by Snack
final
- duration → Duration?
-
How long until Snack will hide itself (be dismissed)
final
- forwardAnimationCurve → Curve
-
The Curve animation used when show() is called
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
You can use any widget here, but I recommend Icon or Image
final
- isDismissible → bool
-
Determines if the user can swipe or click the overlay to dismiss
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftBarIndicatorColor → Color?
-
If not null, shows a left vertical colored bar on notification
final
- mainButton → Widget?
-
An action that the user can take based on the snack bar
final
- margin → EdgeInsets
-
Adds a custom margin to Snack
final
- maxWidth → double?
-
Used to limit Snack width (usually on large screens)
final
- message → String?
-
The message displayed to the user
final
- messageText → Widget?
-
Replaces message. Although this accepts a Widget, it is meant
to receive Text or RichText
final
- onHover → OnHover?
-
A callback that registers the user's hover anywhere over the Snackbar
final
- onTap → OnTap?
-
A callback that registers the user's click anywhere
final
- overlayBlur → double
-
Default is 0.0. If different than 0.0, creates a blurred overlay
final
- overlayColor → Color?
-
Default is Colors.transparent
final
- padding → EdgeInsets
-
Adds a custom padding to Snack
final
- progressIndicatorBackgroundColor → Color?
-
A LinearProgressIndicator configuration parameter
final
- progressIndicatorController → AnimationController?
-
An optional AnimationController when you want to control the progress
final
-
progressIndicatorValueColor
→ Animation<
Color> ? -
A LinearProgressIndicator configuration parameter
final
- reverseAnimationCurve → Curve
-
The Curve animation used when dismiss() is called
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldIconPulse → bool
-
An option to animate the icon (if present). Defaults to true.
final
- showProgressIndicator → bool
-
True if you want to show a LinearProgressIndicator
final
- snackbarStatus → SnackbarStatusCallback?
-
A callback for you to listen to the different Snack status
final
- snackPosition → SnackPosition
-
Snack can be based on
SnackPosition.TOPor onSnackPosition.BOTTOMfinal - snackStyle → SnackStyle
-
Snack can be floating or be grounded to the edge of the screen
final
- title → String?
-
The title displayed to the user
final
- titleText → Widget?
-
Replaces title. Although this accepts a Widget, it is meant
to receive Text or RichText
final
- userInputForm → Form?
-
A TextFormField in case you want a simple user input
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited