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) {
  var child = namedArguments[const Symbol('child')];
  if (child == null) {
    throw "child required in SafeArea";
  }
  bool left = true;
  var leftParsed = namedArguments[const Symbol('left')];
  if (leftParsed != null) {
    left = leftParsed as bool;
  }
  bool top = true;
  var topParsed = namedArguments[const Symbol('top')];
  if (topParsed != null) {
    top = topParsed as bool;
  }
  bool right = true;
  var rightParsed = namedArguments[const Symbol('right')];
  if (rightParsed != null) {
    right = rightParsed as bool;
  }
  bool bottom = true;
  var bottomParsed = namedArguments[const Symbol('bottom')];
  if (bottomParsed != null) {
    bottom = bottomParsed as bool;
  }
  bool maintainBottomViewPadding = false;
  var maintainBottomViewPaddingParsed =
      namedArguments[const Symbol('maintainBottomViewPadding')];
  if (maintainBottomViewPaddingParsed != null) {
    maintainBottomViewPadding = maintainBottomViewPaddingParsed as bool;
  }
  EdgeInsets minimum = EdgeInsets.zero;
  var minimumParsed = namedArguments[const Symbol('minimum')];
  if (minimumParsed != null) {
    minimum = minimumParsed as EdgeInsets;
  }
  return SafeArea(
    child: child as Widget,
    left: left,
    top: top,
    right: right,
    bottom: bottom,
    minimum: minimum,
    maintainBottomViewPadding: maintainBottomViewPadding,
  );
}