max method
Implementation
List<T> max({
required int length,
required String operation,
String? name,
String? reason,
}) {
if (this.length > length) {
throw ArgumentException.invalidOperationArguments(
operation,
name: name,
reason:
reason ??
(name == null
? "Invalid array length"
: "Invalid $name array length."),
);
}
return this;
}