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) {
  double? start = parseDouble(namedArguments[const Symbol('start')]);
  double? top = parseDouble(namedArguments[const Symbol('top')]);
  double? end = parseDouble(namedArguments[const Symbol('end')]);
  double? bottom = parseDouble(namedArguments[const Symbol('bottom')]);
  double? width = parseDouble(namedArguments[const Symbol('width')]);
  double? height = parseDouble(namedArguments[const Symbol('height')]);
  var child = namedArguments[const Symbol('child')];
  if (child == null) {
    throw "child is required";
  }
  TextDirection textDirection;
  var textDirectionParsed = namedArguments[const Symbol('textDirection')];
  if (textDirectionParsed == null) {
    throw "textDirection is required in Positioned.directional";
  }
  textDirection = textDirectionParsed as TextDirection;
  return Positioned.directional(
    textDirection: textDirection,
    start: start,
    top: top,
    end: end,
    bottom: bottom,
    width: width,
    height: height,
    child: child as Widget,
  );
}