loadCurrentRunPoints method Null safety

Future<void> loadCurrentRunPoints()

Load all points for the current run

Implementation

Future<void> loadCurrentRunPoints() async {
  final Run? run = await SyncModelController.instance<Run>().getLatest();
  if (run != null) {
    final runLocation = await getRunLocations(run.id);
    if (runLocation.isNotEmpty) {
      for (final runLocation in runLocation) {
        points.add(runLocation.latLng);
      }
    }
  }
}