TrimRange constructor

TrimRange(
  1. Duration start,
  2. Duration end
)

Creates a range. end must be after start.

Implementation

// Not const: the assert compares Durations, which const evaluation cannot.
// ignore: prefer_const_constructors_in_immutables
TrimRange(this.start, this.end)
  : assert(start < end, 'Trim end must be after start.');