getValues method

List<N> getValues([
  1. int? length
])

Get values with length.

Implementation

List<N> getValues([int? length]) {
  length ??= this.length;
  if (length <= 0) return <N>[];
  if (length > this.length) length = this.length;
  return List.generate(length, (i) => getValue(i));
}