call method

  1. @override
Object? call(
  1. Interpreter interpreter,
  2. List<Object?> arguments,
  3. Map<Symbol, Object?> namedArguments
)
override

Implementation

@override
Object? call(Interpreter interpreter, List<Object?> arguments,
    Map<Symbol, Object?> namedArguments) {
  Widget? title;
  var titleParsed = namedArguments[const Symbol('title')];
  if (titleParsed != null) {
    title = titleParsed as Widget;
  }
  Widget? content;
  var contentParsed = namedArguments[const Symbol('content')];
  if (contentParsed != null) {
    content = contentParsed as Widget;
  }
  TextStyle? titleTextStyle;
  var titleTextStyleParsed = namedArguments[const Symbol('titleTextStyle')];
  if (titleTextStyleParsed != null) {
    titleTextStyle = titleTextStyleParsed as TextStyle;
  }
  TextStyle? contentTextStyle;
  var contentTextStyleParsed =
      namedArguments[const Symbol('contentTextStyle')];
  if (contentTextStyleParsed != null) {
    contentTextStyle = contentTextStyleParsed as TextStyle;
  }
  List<Widget>? actions;
  var actionsParsed = namedArguments[const Symbol('actions')];
  if (actionsParsed != null) {
    actions = (actionsParsed as List).cast<Widget>();
  }
  Color? backgroundColor;
  var backgroundColorParsed = namedArguments[const Symbol('backgroundColor')];
  if (backgroundColorParsed != null) {
    backgroundColor = backgroundColorParsed as Color;
  }
  double? elevation = parseDouble(namedArguments[const Symbol('elevation')]);
  EdgeInsetsGeometry? titlePadding;
  var titlePaddingParsed = namedArguments[const Symbol('titlePadding')];
  if (titlePaddingParsed != null) {
    titlePadding = titlePaddingParsed as EdgeInsetsGeometry;
  }
  EdgeInsetsGeometry contentPadding =
      const EdgeInsets.fromLTRB(24, 24, 24, 24);
  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;
  }
  bool scrollable = false;
  var scrollableParsed = namedArguments[const Symbol('scrollable')];
  if (scrollableParsed != null) {
    scrollable = scrollableParsed as bool;
  }
  EdgeInsetsGeometry actionsPadding = EdgeInsets.zero;
  var actionsPaddingParsed = namedArguments[const Symbol('actionsPadding')];
  if (actionsPaddingParsed != null) {
    actionsPadding = actionsPaddingParsed as EdgeInsetsGeometry;
  }
  VerticalDirection? actionsOverflowDirection;
  var actionsOverflowDirectionParsed =
      namedArguments[const Symbol('actionsOverflowDirection')];
  if (actionsOverflowDirectionParsed != null) {
    actionsOverflowDirection =
        actionsOverflowDirectionParsed as VerticalDirection;
  }
  double? actionsOverflowButtonSpacing = parseDouble(
      namedArguments[const Symbol('actionsOverflowButtonSpacing')]);
  EdgeInsetsGeometry? buttonPadding;
  var buttonPaddingParsed = namedArguments[const Symbol('buttonPadding')];
  if (buttonPaddingParsed != null) {
    buttonPadding = buttonPaddingParsed as EdgeInsetsGeometry;
  }
  MainAxisAlignment? actionsAlignment;
  var actionsAlignmentParsed =
      namedArguments[const Symbol('actionsAlignment')];
  if (actionsAlignmentParsed != null) {
    actionsAlignment = actionsAlignmentParsed as MainAxisAlignment;
  }
  return AlertDialog(
    title: title,
    content: content,
    titleTextStyle: titleTextStyle,
    contentTextStyle: contentTextStyle,
    actions: actions,
    backgroundColor: backgroundColor,
    elevation: elevation,
    titlePadding: titlePadding,
    contentPadding: contentPadding,
    shape: shape,
    scrollable: scrollable,
    actionsAlignment: actionsAlignment,
    actionsPadding: actionsPadding,
    actionsOverflowDirection: actionsOverflowDirection,
    actionsOverflowButtonSpacing: actionsOverflowButtonSpacing,
    buttonPadding: buttonPadding,
  );
}