addLocation method Null safety
- Location location
Add a location to the observable
Implementation
Future<void> addLocation(Location location) async {
final run = RunWorkflowController.instance.currentRun;
if (run.id.isNotEmpty) {
final _runLocation = RunLocation.fromLocation(
location: location.toMap().cast<String, dynamic>(),
runId: run.id,
);
points.add(location.latLng);
await updateRunLocation(_runLocation);
}
}