exceptedLen method

List<T> exceptedLen(
  1. int len, {
  2. String? message,
})

Implementation

List<T> exceptedLen(int len, {String? message}) {
  if (length != len) {
    throw ArgumentException(message ?? 'Invalid length. ',
        details: {"excepted": len, "length": length});
  }
  return this;
}