Alert class
Attract user attention with important static message
- Inheritance
- Implementers
Constructors
-
Alert({Key? key, bool visible = true, ValueChanged<
bool> ? onChanged, AlertTransitionBuilder? transitionBuilder = AlertTransition.crossFade, AlertLayoutBuilder layoutBuilder = AlertLayout.defaults, Widget? title, Widget? message, Widget? icon, Widget? action, AlertVariant? variant, AlertSeverity? severity, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, double? elevation, BorderRadius? borderRadius, double? iconSize, AlertStyle? style, Curve? curve, Duration? duration}) -
const
-
Alert.danger({Key? key, bool visible = true, ValueChanged<
bool> ? onChanged, AlertTransitionBuilder? transitionBuilder = AlertTransition.crossFade, AlertLayoutBuilder layoutBuilder = AlertLayout.defaults, Widget? title, Widget? message, Widget? icon = AlertIcons.danger, Widget? action, AlertVariant? variant, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, double? elevation, BorderRadius? borderRadius, double? iconSize, AlertStyle? style, Curve? curve, Duration? duration}) -
const
-
Alert.info({Key? key, bool visible = true, ValueChanged<
bool> ? onChanged, AlertTransitionBuilder? transitionBuilder = AlertTransition.crossFade, AlertLayoutBuilder layoutBuilder = AlertLayout.defaults, Widget? title, Widget? message, Widget? icon = AlertIcons.info, Widget? action, AlertVariant? variant, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, double? elevation, BorderRadius? borderRadius, double? iconSize, AlertStyle? style, Curve? curve, Duration? duration}) -
const
-
Alert.success({Key? key, bool visible = true, ValueChanged<
bool> ? onChanged, AlertTransitionBuilder? transitionBuilder = AlertTransition.crossFade, AlertLayoutBuilder layoutBuilder = AlertLayout.defaults, Widget? title, Widget? message, Widget? icon = AlertIcons.success, Widget? action, AlertVariant? variant, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, double? elevation, BorderRadius? borderRadius, double? iconSize, AlertStyle? style, Curve? curve, Duration? duration}) -
const
-
Alert.warning({Key? key, bool visible = true, ValueChanged<
bool> ? onChanged, AlertTransitionBuilder? transitionBuilder = AlertTransition.crossFade, AlertLayoutBuilder layoutBuilder = AlertLayout.defaults, Widget? title, Widget? message, Widget? icon = AlertIcons.warning, Widget? action, AlertVariant? variant, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? spacing, double? elevation, BorderRadius? borderRadius, double? iconSize, AlertStyle? style, Curve? curve, Duration? duration}) -
const
Properties
- action → Widget?
-
Widget displayed next to title
final
- borderRadius → BorderRadius?
-
The radii for each corner of the alert's border.
final
- curve → Curve?
-
The curve to apply when animating the parameters of this widget.
final
- duration → Duration?
-
The duration over which to animate the parameters of this widget.
final
- effectiveStyle → AlertStyle
-
no setter
- elevation → double?
-
The alert's z-coordinate relative to
the parent at which to place this physical object.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
Icon displayed prior to title
final
- iconSize → double?
-
The size of the icon's inside the alert, in logical pixels.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutBuilder → AlertLayoutBuilder
-
A function that wraps all of the children that are transitioning out, and the
child
that's transitioning in, with a widget that lays all of them out. This is called every time this widget is built. The function must not return null.final - margin → EdgeInsetsGeometry?
-
Empty space to surround the outside alert.
final
- message → Widget?
-
The text to display below the title
final
-
onChanged
→ ValueChanged<
bool> ? -
Called when the alert should change
between visible and hidden states.
final
- padding → EdgeInsetsGeometry?
-
The padding between the contents of the alert and the outside alert.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → AlertSeverity?
-
Type of the alert severity
final
- spacing → double?
-
How much space to place between alert's foreground widget in a run in the main axis.
final
- style → AlertStyle?
-
The style to be applied to the alert.
final
- title → Widget?
-
The primary content of the Alert.
final
- transitionBuilder → AlertTransitionBuilder?
-
A function that wraps a new
content
with an animation that transitions thecontent
in when the animation runs in the forward direction and out when the animation runs in the reverse direction. This is only called when a newcontent
is set (not for each build), or when a new transitionBuilder is set. If a new transitionBuilder is set, then the transition is rebuilt for the current content and all previous children using the new transitionBuilder. The function must not return null.final - variant → AlertVariant?
-
Type of the alert variant
final
- visible → bool
-
Whether or not this alert is visible.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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