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) {
  List<Widget> children = [];
  var childrenParsed = namedArguments[const Symbol('children')];
  if (childrenParsed != null) {
    children = (childrenParsed as List).cast<Widget>();
  }
  double spacing = parseDouble(namedArguments[const Symbol('spacing')]) ?? 0;
  double runSpacing =
      parseDouble(namedArguments[const Symbol('runSpacing')]) ?? 0;
  WrapAlignment alignment = WrapAlignment.start;
  var alignmentParsed = namedArguments[const Symbol('alignment')];
  if (alignmentParsed != null) {
    alignment = alignmentParsed as WrapAlignment;
  }
  WrapAlignment runAlignment = WrapAlignment.start;
  var runAlignmentParsed = namedArguments[const Symbol('runAlignment')];
  if (runAlignmentParsed != null) {
    runAlignment = runAlignmentParsed as WrapAlignment;
  }
  Axis direction = Axis.horizontal;
  var directionParsed = namedArguments[const Symbol('direction')];
  if (directionParsed != null) {
    direction = directionParsed as Axis;
  }
  TextDirection? textDirection;
  var textDirectionParsed = namedArguments[const Symbol('textDirection')];
  if (textDirectionParsed != null) {
    textDirection = textDirectionParsed as TextDirection;
  }
  VerticalDirection verticalDirection = VerticalDirection.down;
  var verticalDirectionParsed =
      namedArguments[const Symbol('verticalDirection')];
  if (verticalDirectionParsed != null) {
    verticalDirection = verticalDirectionParsed as VerticalDirection;
  }
  WrapCrossAlignment crossAlignment = WrapCrossAlignment.start;
  var crossAlignmentParsed = namedArguments[const Symbol('crossAlignment')];
  if (crossAlignmentParsed != null) {
    crossAlignment = crossAlignmentParsed as WrapCrossAlignment;
  }
  return Wrap(
    direction: direction,
    children: children,
    spacing: spacing,
    textDirection: textDirection,
    crossAxisAlignment: crossAlignment,
    verticalDirection: verticalDirection,
    runSpacing: runSpacing,
    alignment: alignment,
    runAlignment: runAlignment,
  );
}