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;
  }
  BoxBorder? border;
  var borderParsed = namedArguments[const Symbol('border')];
  if (borderParsed != null) {
    border = borderParsed as BoxBorder;
  }
  BorderRadiusGeometry? borderRadius;
  var borderRadiusParsed = namedArguments[const Symbol('borderRadius')];
  if (borderRadiusParsed != null) {
    borderRadius = borderRadiusParsed as BorderRadiusGeometry;
  }
  List<BoxShadow>? boxShadow;
  var boxShadowParsed = namedArguments[const Symbol('boxShadow')];
  if (boxShadowParsed != null) {
    boxShadow = (boxShadowParsed as List).cast<BoxShadow>();
  }
  Gradient? gradient;
  var gradientParsed = namedArguments[const Symbol('gradient')];
  if (gradientParsed != null) {
    gradient = gradientParsed as Gradient;
  }
  BlendMode? backgroundBlendMode;
  var backgroundBlendModeParsed =
      namedArguments[const Symbol('backgroundBlendMode')];
  if (backgroundBlendModeParsed != null) {
    backgroundBlendMode = backgroundBlendModeParsed as BlendMode;
  }
  BoxShape shape = BoxShape.rectangle;
  var shapeParsed = namedArguments[const Symbol('shape')];
  if (shapeParsed != null) {
    shape = shapeParsed as BoxShape;
  }
  DecorationImage? image;
  var imageParsed = namedArguments[const Symbol('image')];
  if (imageParsed != null) {
    image = imageParsed as DecorationImage;
  }
  return BoxDecoration(
      color: color,
      border: border,
      gradient: gradient,
      image: image,
      shape: shape,
      backgroundBlendMode: backgroundBlendMode,
      borderRadius: borderRadius,
      boxShadow: boxShadow);
}