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 length = namedArguments[const Symbol('length')];
  if (length == null) {
    throw "length required in DefaultTabController";
  }
  int initialIndex = 0;
  var initialIndexParsed = namedArguments[const Symbol('initialIndex')];
  if (initialIndexParsed != null) {
    initialIndex = initialIndexParsed as int;
  }
  var child = namedArguments[const Symbol('child')];
  if (child == null) {
    throw "child required in DefaultTabController";
  }
  return DefaultTabController(
    length: length as int,
    initialIndex: initialIndex,
    child: child as Widget,
  );
}