generate method

  1. @override
dynamic generate(
  1. dynamic theme
)
override

Implementation

@override
generate(dynamic theme) {
  if (theme == null) {
    if (style != null) {
      return DialogTheme(
        alignment: style!.alignment,
        backgroundColor: style!.background,
        iconColor: style!.foreground,
        shape: style!.shape(),
        elevation: style!.elevation,

        // actionsPadding: ???
        // titleTextStyle:
      );
    } else {
      return null;
    }
  } else {
    if (style != null) {
      return (theme as DialogTheme).copyWith(
        alignment: style!.alignment ?? theme.alignment,
        backgroundColor: style!.background ?? theme.backgroundColor,
        iconColor: style!.foreground ?? theme.iconColor,
        shape: style!.shape() ?? theme.shape,
        elevation: style!.elevation ?? theme.elevation,
      );
    } else {
      return theme as DialogTheme;
    }
  }
}