copyWith method

AutonomyAStarState copyWith(
  1. {required DriveDirection direction,
  2. required DriveOrientation orientation,
  3. required GpsCoordinates position}
)

Implementation

AutonomyAStarState copyWith({required DriveDirection direction, required DriveOrientation orientation, required GpsCoordinates position}) => AutonomyAStarState(
  collection: collection,
  position: position,
  orientation: orientation,
  direction: direction,
  goal: goal,
  depth: direction == DriveDirection.forward ? depth + 1 : depth + 2,
);