newEmpty method

  1. @override
GpcCompactGpsMeasurement newEmpty(
  1. {int? capacity}
)
override

Creates a collection of the same type as this, optionally with a starting capacity for children that support that.

Setting the capacity at the correct value can for huge lists with millions of items have a significant impact on the performance of filling the list.

Implementation

@override
GpcCompactGpsMeasurement newEmpty({int? capacity}) {
  return GpcCompactGpsMeasurement()..capacity = capacity ?? 0;
}