Alert class

Alert banners communicate a state.

Inheritance

Constructors

Alert({Key? key, Widget child = const SizedBox(), Widget closeIcon = _defaultCloseIcon, Color color = _defaultColor, Widget icon = _defaultIcon, bool isVisible = _defaultIsVisible, VoidCallback? onClose, EdgeInsets padding = _defaultPadding})
Alert banners communicate a state.
const
Alert.error({Key? key, required Widget child, Widget closeIcon = _defaultCloseIcon, bool isVisible = _defaultIsVisible, VoidCallback? onClose, EdgeInsets padding = _defaultPadding})
Alert banners communicate a state.
const
Alert.offline({Key? key, required Widget child, Widget closeIcon = _defaultCloseIcon, bool isVisible = _defaultIsVisible, VoidCallback? onClose, EdgeInsets padding = _defaultPadding})
Alert banners communicate a state.
const
Alert.warning({Key? key, required Widget child, Widget closeIcon = _defaultCloseIcon, bool isVisible = _defaultIsVisible, VoidCallback? onClose, EdgeInsets padding = _defaultPadding})
Alert banners communicate a state.
const

Properties

child Widget
The widget shown inside the alert.
final
closeIcon Widget
The icon used to close the alert.
final
color Color
The color of the alert. Defaults to a light grey.
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget
The icon shown to the left of the child.
final
isVisible bool
Determines if this alert is visible.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onClose VoidCallback?
A function called when the close icon is pressed.
final
padding EdgeInsets
The child is placed inside this padding.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<Alert>
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}) 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