copyWithLocations method
Locator
copyWithLocations(
{ - List<String>? fragments,
- double? progression = _emptyDoubleValue,
- int? position = _emptyIntValue,
- double? totalProgression = _emptyDoubleValue,
- 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,
}) => copyWith(
locations: (locations ?? Locations()).copyWith(
fragments: fragments ?? locations?.fragments,
progression: progression.check(locations?.progression),
position: position.check(locations?.position),
totalProgression: totalProgression.check(locations?.totalProgression),
additionalProperties: otherLocations ?? locations?.additionalProperties,
),
);