RangeError.index constructor

RangeError.index(
  1. int index,
  2. dynamic indexable, [
  3. String? name,
  4. String? message,
  5. int? length,
])

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;