AlertStyle class
Alert style class for reusable customization of dialogs.
Constructors
- AlertStyle.new({AnimationType animationType = AnimationType.fromBottom, Duration animationDuration = const Duration(milliseconds: 200), ShapeBorder? alertBorder, bool isButtonVisible = true, bool isCloseButton = true, bool isOverlayTapDismiss = true, Color? backgroundColor, Color overlayColor = Colors.black87, TextStyle titleStyle = const TextStyle(color: Colors.black, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal), TextAlign titleTextAlign = TextAlign.center, TextStyle descStyle = const TextStyle(color: Colors.black, fontWeight: FontWeight.w400, fontStyle: FontStyle.normal), TextAlign descTextAlign = TextAlign.center, EdgeInsets buttonAreaPadding = const EdgeInsets.all(20.0), BoxConstraints? constraints, ButtonsDirection buttonsDirection = ButtonsDirection.row, double? alertElevation, EdgeInsets alertPadding = defaultAlertPadding, AlignmentGeometry alertAlignment = Alignment.bottomCenter})
-
Alert style constructor function
The
animationType
parameter is used for transitions. Default: "fromBottom" TheanimationDuration
parameter is used to set the animation transition time. Default: "200 ms" ThealertBorder
parameter sets border. TheisButtonVisible
paramater is used to decide hide or display buttons TheisCloseButton
parameter sets visibility of the close button. Default: "true" TheisOverlayTapDismiss
parameter sets closing the alert by clicking outside. Default: "true" ThebackgroundColor
parameter sets the background color. TheoverlayColor
parameter sets the background color of the outside. Default: "Color(0xDD000000)" ThetitleStyle
parameter sets alert title text style. ThetitleTextAlign
parameter sets alignment of the title. ThedescStyle
parameter sets alert desc text style. ThedescTextAlign
parameter sets alignment of the desc. ThebuttonAreaPadding
parameter sets button area padding. Theconstraints
parameter sets Alert size. ThebuttonsDirection
parameter sets button container as Row or Col. ThealertElevation
parameter sets elevation of alert dialog container. ThealertPadding
parameter sets alert area padding.const
Properties
- alertAlignment → AlignmentGeometry
-
final
- alertBorder → ShapeBorder?
-
final
- alertElevation → double?
-
final
- alertPadding → EdgeInsets
-
final
- animationDuration → Duration
-
final
- animationType → AnimationType
-
final
- backgroundColor → Color?
-
final
-
final
-
final
- constraints → BoxConstraints?
-
final
- descStyle → TextStyle
-
final
- descTextAlign → TextAlign
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isButtonVisible → bool
-
final
- isCloseButton → bool
-
final
- isOverlayTapDismiss → bool
-
final
- overlayColor → Color
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- titleStyle → TextStyle
-
final
- titleTextAlign → TextAlign
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited