DialogTheme constructor

const DialogTheme({
  1. Key? key,
  2. Color? backgroundColor,
  3. double? elevation,
  4. Color? shadowColor,
  5. Color? surfaceTintColor,
  6. ShapeBorder? shape,
  7. AlignmentGeometry? alignment,
  8. Color? iconColor,
  9. TextStyle? titleTextStyle,
  10. TextStyle? contentTextStyle,
  11. EdgeInsetsGeometry? actionsPadding,
  12. Color? barrierColor,
  13. EdgeInsets? insetPadding,
  14. Clip? clipBehavior,
  15. DialogThemeData? data,
  16. Widget? child,
})

Creates a dialog theme that can be used for ThemeData.dialogTheme.

Implementation

const DialogTheme({
  super.key,
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  AlignmentGeometry? alignment,
  Color? iconColor,
  TextStyle? titleTextStyle,
  TextStyle? contentTextStyle,
  EdgeInsetsGeometry? actionsPadding,
  Color? barrierColor,
  EdgeInsets? insetPadding,
  Clip? clipBehavior,
  DialogThemeData? data,
  Widget? child,
}) : assert(
    data == null ||
    (backgroundColor ??
    elevation ??
    shadowColor ??
    surfaceTintColor ??
    shape ??
    alignment ??
    iconColor ??
    titleTextStyle ??
    contentTextStyle ??
    actionsPadding ??
    barrierColor ??
    insetPadding ??
    clipBehavior) == null),
    _data = data,
    _backgroundColor = backgroundColor,
    _elevation = elevation,
    _shadowColor = shadowColor,
    _surfaceTintColor = surfaceTintColor,
    _shape = shape,
    _alignment = alignment,
    _iconColor = iconColor,
    _titleTextStyle = titleTextStyle,
    _contentTextStyle = contentTextStyle,
    _actionsPadding = actionsPadding,
    _barrierColor = barrierColor,
    _insetPadding = insetPadding,
    _clipBehavior = clipBehavior,
    super(child: child ?? const SizedBox());