mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-08-15 07:30:50 +02:00
pretty broken, icons missing, login not working. browser opens though and cams still appear on map
This commit is contained in:
@@ -5,12 +5,28 @@ class PendingUpload {
|
||||
final LatLng coord;
|
||||
final double direction;
|
||||
final CameraProfile profile;
|
||||
final DateTime queuedAt;
|
||||
int attempts;
|
||||
|
||||
PendingUpload({
|
||||
required this.coord,
|
||||
required this.direction,
|
||||
required this.profile,
|
||||
}) : queuedAt = DateTime.now();
|
||||
this.attempts = 0,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'lat': coord.latitude,
|
||||
'lon': coord.longitude,
|
||||
'dir': direction,
|
||||
'profile': profile.name,
|
||||
'attempts': attempts,
|
||||
};
|
||||
|
||||
factory PendingUpload.fromJson(Map<String, dynamic> j) => PendingUpload(
|
||||
coord: LatLng(j['lat'], j['lon']),
|
||||
direction: j['dir'],
|
||||
profile: CameraProfile.alpr(), // only built‑in for now
|
||||
attempts: j['attempts'] ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user