Update: 2026-07-12 18:53:59

This commit is contained in:
Hamza-Ayed
2026-07-12 18:53:59 +03:00
parent 8cd4a4b57e
commit 653d73422f
54 changed files with 2078 additions and 436 deletions
@@ -3,29 +3,35 @@
class TransitStopInfo {
final int sequence;
final String nameAr;
final double lat;
final double lng;
final double latitude;
final double longitude;
final double geofenceRadius; // متر
final int? etaOffsetMin;
TransitStopInfo({
required this.sequence,
required this.nameAr,
required this.lat,
required this.lng,
required this.latitude,
required this.longitude,
this.geofenceRadius = 150,
this.etaOffsetMin,
});
factory TransitStopInfo.fromJson(Map<String, dynamic> j) => TransitStopInfo(
sequence: int.tryParse(j['sequence'].toString()) ?? 0,
nameAr: j['name_ar']?.toString() ?? '',
lat: double.tryParse(j['latitude']?.toString() ?? '0') ?? 0,
lng: double.tryParse(j['longitude']?.toString() ?? '0') ?? 0,
latitude: double.tryParse(j['latitude']?.toString() ?? '0') ?? 0,
longitude: double.tryParse(j['longitude']?.toString() ?? '0') ?? 0,
geofenceRadius: double.tryParse(j['geofence_radius']?.toString() ?? '150') ?? 150,
etaOffsetMin: j['eta_offset_min'] == null
? null
: int.tryParse(j['eta_offset_min'].toString()),
);
}
// alias للتوافق مع كود الجيوفينس
typedef TransitStop = TransitStopInfo;
class TransitDriverTrip {
final int id;
final int routeId;