On this page
RangeError.index constructor
Creates a new RangeError stating that index is not a valid index into indexable.
An optional name can specify the argument name that has the invalid value, and the message can override the default error description.
The length is the length of indexable at the time of the error. If length is omitted, it defaults to indexable.length.
Implementation
factory RangeError.index(int index, dynamic indexable,
[String? name, String? message, int? length]) = IndexError;
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/RangeError/RangeError.index.html