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 = Colors.black;
  if (namedArguments[const Symbol('color')] != null) {
    color = namedArguments[const Symbol('color')] as Color;
  }
  Offset offset = Offset.zero;
  if (namedArguments[const Symbol('offset')] != null) {
    offset = namedArguments[const Symbol('offset')] as Offset;
  }
  double blurRadius =
      parseDouble(namedArguments[const Symbol('blurRadius')]) ?? 0.0;
  double spreadRadius =
      parseDouble(namedArguments[const Symbol('spreadRadius')]) ?? 0.0;
  return BoxShadow(
      color: color,
      offset: offset,
      blurRadius: blurRadius,
      spreadRadius: spreadRadius);
}