copyWith method

GeolocationState copyWith({
  1. bool? enabled,
  2. bool? isMoving,
  3. bool? schedulerEnabled,
  4. double? odometer,
  5. Location? location,
  6. JsonMap? extras,
})

Creates a copy of this state with the given fields replaced.

Implementation

GeolocationState copyWith({
  bool? enabled,
  bool? isMoving,
  bool? schedulerEnabled,
  double? odometer,
  Location? location,
  JsonMap? extras,
}) {
  return GeolocationState(
    enabled: enabled ?? this.enabled,
    isMoving: isMoving ?? this.isMoving,
    schedulerEnabled: schedulerEnabled ?? this.schedulerEnabled,
    odometer: odometer ?? this.odometer,
    location: location ?? this.location,
    extras: extras ?? this.extras,
  );
}