call method
Implementation
@override
Object? call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
List<Widget>? children;
var childrenParsed = namedArguments[const Symbol('children')];
if (childrenParsed != null) {
children = childrenParsed as List<Widget>;
}
Widget? title;
var titleParsed = namedArguments[const Symbol('title')];
if (titleParsed != null) {
title = titleParsed as Widget;
}
TextStyle? titleTextStyle;
var titleTextStyleParsed = namedArguments[const Symbol('titleTextStyle')];
if (titleTextStyleParsed != null) {
titleTextStyle = titleTextStyleParsed as TextStyle;
}
Color? backgroundColor;
var backgroundColorParsed = namedArguments[const Symbol('backgroundColor')];
if (backgroundColorParsed != null) {
backgroundColor = backgroundColorParsed as Color;
}
double? elevation = parseDouble(namedArguments[const Symbol('elevation')]);
EdgeInsetsGeometry titlePadding =
const EdgeInsets.fromLTRB(24.0, 24.0, 24.0, 0.0);
var titlePaddingParsed = namedArguments[const Symbol('titlePadding')];
if (titlePaddingParsed != null) {
titlePadding = titlePaddingParsed as EdgeInsetsGeometry;
}
EdgeInsetsGeometry contentPadding = const EdgeInsets.fromLTRB(0, 12, 0, 16);
var contentPaddingParsed = namedArguments[const Symbol('contentPadding')];
if (contentPaddingParsed != null) {
contentPadding = contentPaddingParsed as EdgeInsetsGeometry;
}
ShapeBorder? shape;
var shapeParsed = namedArguments[const Symbol('shape')];
if (shapeParsed != null) {
shape = shapeParsed as ShapeBorder;
}
return SimpleDialog(
title: title,
titlePadding: titlePadding,
titleTextStyle: titleTextStyle,
backgroundColor: backgroundColor,
contentPadding: contentPadding,
elevation: elevation,
shape: shape,
children: children,
);
}