FlashyFlushbar class
FlashyFlushbar
is a customizable and animated Flutter widget for displaying
informative messages to users. It provides a sleek and visually appealing way
to convey messages, warnings, or notifications.
To use FlashyFlushbar
, create an instance of this class and customize its
properties such as duration, message, style, and appearance. Then, call the
show()
method to display the flushbar.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlashyFlushbar
Constructors
-
FlashyFlushbar({Key? key, Duration duration = const Duration(seconds: 1), String message = '', TextStyle messageStyle = const TextStyle(color: Colors.black, fontSize: 16), EdgeInsets margin = const EdgeInsets.only(left: 32, right: 32, top: 20), Color backgroundColor = Colors.white, List<
BoxShadow> ? boxShadows = const [BoxShadow(color: Color(0x1a000000), blurRadius: 10, offset: Offset(0, 4))], BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(16)), double height = 64, Duration animationDuration = const Duration(milliseconds: 500), Widget leadingWidget = const SizedBox(), Widget trailingWidget = const SizedBox(), double messageHorizontalSpacing = 8, EdgeInsets horizontalPadding = const EdgeInsets.symmetric(horizontal: 16), DismissDirection dismissDirection = DismissDirection.horizontal, VoidCallback? onTap, bool isDismissible = true}) -
Constructs a
FlashyFlushbar
widget with customizable properties.const
Properties
- animationDuration → Duration
-
The duration of the animation when showing and hiding the flushbar.
final
- backgroundColor → Color
-
The background color of the flushbar.
final
- borderRadius → BorderRadiusGeometry
-
The border radius of the flushbar.
final
-
boxShadows
→ List<
BoxShadow> ? -
The box shadows for the flushbar.
final
- dismissDirection → DismissDirection
-
The direction in which the flushbar can be dismissed.
final
- duration → Duration
-
The duration for which the flushbar will be displayed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The height of the flushbar.
final
- horizontalPadding → EdgeInsets
-
The horizontal padding of the flushbar.
final
- isDismissible → bool
-
A flag indicating whether the flushbar can be dismissed.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingWidget → Widget
-
A widget to be displayed on the left side of the flushbar.
final
- margin → EdgeInsets
-
The margin around the flushbar.
final
- message → String
-
The text message to be displayed by the flushbar.
final
- messageHorizontalSpacing → double
-
The spacing between the message and the leading/trailing widgets.
final
- messageStyle → TextStyle
-
The style of the text message, including color and font size.
final
- onTap → VoidCallback?
-
A callback function to be executed when the flushbar is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trailingWidget → Widget
-
A widget to be displayed on the right side of the flushbar.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FlashyFlushbar> -
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
-
show(
) → void - Displays the flushbar by creating an overlay entry.
-
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}) → 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