IndexError.withLength constructor
- @Since("2.19")
Creates a new IndexError stating that invalidValue
is not a valid index
into indexable
.
The length
is the length of indexable
at the time of the error.
The message is used as part of the string representation of the error.
Implementation
@Since("2.19")
IndexError.withLength(
int invalidValue,
this.length, {
this.indexable,
String? name,
String? message,
}) : super.value(invalidValue, name, message ?? "Index out of range");