FloatingSnackBarWidget class
The visual card for a floating snackbar.
This is an internal widget driven by the overlay controller. It animates itself in on insertion using animation, and calls onDismiss once its exit animation completes so the controller can remove it.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FloatingSnackBarWidget
Constructors
- FloatingSnackBarWidget({Key? key, required String message, required FloatingSnackBarTheme theme, required FloatingSnackBarType type, required FloatingSnackBarPosition position, required FloatingSnackBarAnimation animation, required Duration duration, required VoidCallback onDismiss, String? title, Widget? leading, FloatingSnackBarAction? action, Color? backgroundColor, Color? textColor, TextStyle? textStyle, TextStyle? titleStyle, bool dismissOnTap = false, bool showProgress = false})
-
Creates the visual snackbar card.
const
Properties
- action → FloatingSnackBarAction?
-
Optional trailing action button.
final
- animation → FloatingSnackBarAnimation
-
Entrance/exit animation.
final
- backgroundColor → Color?
-
Background color override.
final
- dismissOnTap → bool
-
Whether tapping the card dismisses it.
final
- duration → Duration
-
Visible duration before auto-dismiss.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
Optional leading widget (usually an Icon). Overrides the type's default
icon when provided.
final
- message → String
-
The body text.
final
- onDismiss → VoidCallback
-
Called when the card has finished its exit animation and should be
removed from the overlay.
final
- position → FloatingSnackBarPosition
-
Screen anchor.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showProgress → bool
-
Whether to render a countdown progress bar.
final
- textColor → Color?
-
Text color override.
final
- textStyle → TextStyle?
-
Message text style override.
final
- theme → FloatingSnackBarTheme
-
The active theme used to resolve unset styling.
final
- title → String?
-
Optional bold title shown above message.
final
- titleStyle → TextStyle?
-
Title text style override.
final
- type → FloatingSnackBarType
-
The semantic type, controlling default color/icon.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FloatingSnackBarWidget> -
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