copyWithLocations method

Locator copyWithLocations({
  1. List<String>? fragments,
  2. double? progression = _emptyDoubleValue,
  3. int? position = _emptyIntValue,
  4. double? totalProgression = _emptyDoubleValue,
  5. Map<String, dynamic>? otherLocations,
})

Shortcut to get a copy of the Locator with different Locations sub-properties.

Implementation

Locator copyWithLocations(
        {List<String>? fragments,
        double? progression = _emptyDoubleValue,
        int? position = _emptyIntValue,
        double? totalProgression = _emptyDoubleValue,
        Map<String, dynamic>? otherLocations}) =>
    copy(
        locations: locations.copy(
      fragments: fragments ?? locations.fragments,
      progression: progression.check(locations.progression),
      position: position.check(locations.position),
      totalProgression: totalProgression.check(locations.totalProgression),
      otherLocations: otherLocations ?? locations.otherLocations,
    ));