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) {
  Color? color;
  var colorParsed = namedArguments[const Symbol('color')];
  if (colorParsed != null) {
    color = colorParsed as Color;
  }
  Color? shadowColor;
  var shadowColorParsed = namedArguments[const Symbol('shadowColor')];
  if (shadowColorParsed != null) {
    shadowColor = shadowColorParsed as Color;
  }
  TextStyle? textStyle;
  var textStyleParsed = namedArguments[const Symbol('textStyle')];
  if (textStyleParsed != null) {
    textStyle = textStyleParsed as TextStyle;
  }
  BorderRadiusGeometry? borderRadius;
  var borderRadiusParsed = namedArguments[const Symbol('borderRadius')];
  if (borderRadiusParsed != null) {
    borderRadius = borderRadiusParsed as BorderRadiusGeometry;
  }
  ShapeBorder? shape;
  var shapeParsed = namedArguments[const Symbol('shape')];
  if (shapeParsed != null) {
    shape = shapeParsed as ShapeBorder;
  }
  Widget? child;
  var childParsed = namedArguments[const Symbol('child')];
  if (childParsed != null) {
    child = childParsed as Widget;
  }
  double elevation =
      parseDouble(namedArguments[const Symbol('elevation')]) ?? 0;
  return Material(
      color: color,
      shadowColor: shadowColor,
      textStyle: textStyle,
      elevation: elevation,
      borderRadius: borderRadius,
      shape: shape,
      child: child);
}