AlertDialog constructor Null safety
- {Key? key,
- Widget? icon,
- EdgeInsetsGeometry? iconPadding,
- Color? iconColor,
- Widget? title,
- EdgeInsetsGeometry? titlePadding,
- TextStyle? titleTextStyle,
- Widget? content,
- EdgeInsetsGeometry? contentPadding,
- TextStyle? contentTextStyle,
- List<
Widget> ? actions, - EdgeInsetsGeometry? actionsPadding,
- MainAxisAlignment? actionsAlignment,
- OverflowBarAlignment? actionsOverflowAlignment,
- VerticalDirection? actionsOverflowDirection,
- double? actionsOverflowButtonSpacing,
- EdgeInsetsGeometry? buttonPadding,
- Color? backgroundColor,
- double? elevation,
- String? semanticLabel,
- EdgeInsets insetPadding = _defaultInsetPadding,
- Clip clipBehavior = Clip.none,
- ShapeBorder? shape,
- AlignmentGeometry? alignment,
- bool scrollable = false}
Creates an alert dialog.
Typically used in conjunction with showDialog.
The titlePadding and contentPadding default to null, which implies a default that depends on the values of the other properties. See the documentation of titlePadding and contentPadding for details.
Implementation
const AlertDialog({
super.key,
this.icon,
this.iconPadding,
this.iconColor,
this.title,
this.titlePadding,
this.titleTextStyle,
this.content,
this.contentPadding,
this.contentTextStyle,
this.actions,
this.actionsPadding,
this.actionsAlignment,
this.actionsOverflowAlignment,
this.actionsOverflowDirection,
this.actionsOverflowButtonSpacing,
this.buttonPadding,
this.backgroundColor,
this.elevation,
this.semanticLabel,
this.insetPadding = _defaultInsetPadding,
this.clipBehavior = Clip.none,
this.shape,
this.alignment,
this.scrollable = false,
}) : assert(clipBehavior != null);