newList method

List<T> newList(
  1. int length, [
  2. T? fillValue
])

Creates a fixed-length list of this data type.

Implementation

List<T> newList(int length, [T? fillValue]) =>
    List<T>.filled(length, fillValue ?? defaultValue);