getPopoReportsNear method

Future<List<Report>> getPopoReportsNear(
  1. RaliPosition position,
  2. double radiusKm
)

Gets hazards specifically of type "popo" (police)

Implementation

Future<List<Report>> getPopoReportsNear(RaliPosition position, double radiusKm) async {
  try {
    // Convert RaliPosition to GeoPoint
    final geoPoint = GeoPoint(position.lat, position.lng);
    final userReports = await _reportService.getReportsByTypeNear(
      'popo', geoPoint, radiusKm);

    return userReports;
  } catch (e) {
    print('Error getting popo reports: $e');
    return [];
  }
}