W3cubDocs

/Dart 2

RangeError.index constructor

RangeError.index(int index, dynamic indexable, [ String name, String message, 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, indexable,
    [String name, String message, int length]) = IndexError;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/RangeError/RangeError.index.html