Конструктор IndexError.withLength
- @Since("2.19")
Создает новый IndexError, указывающий, что invalidValue не является допустимым индексом для indexable.
length — это длина indexable на момент возникновения ошибки.
Сообщение используется как часть строкового представления ошибки.
Реализация
@Since("2.19")
IndexError.withLength(int invalidValue, this.length,
{this.indexable, String? name, String? message})
: super.value(invalidValue, name, message ?? "Index out of range");
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/IndexError/IndexError.withLength.html