fill method Null safety

  1. @override
void fill(
  1. double value
)
override

Fills each element with the argument.

Element i is calculated with the formula:

x[i] = value;

Implementation

@override
void fill(double value) {
  final elements = this.elements;
  final n = length;
  for (var i = 0; i < n; i++) {
    elements[i] = value;
  }
}