more pleasant progress handling, although somewhat flawed

This commit is contained in:
2025-02-14 12:23:41 +01:00
parent aed407e2d0
commit 8f6dfd404d
8 changed files with 287 additions and 172 deletions

View File

@@ -27,7 +27,7 @@ final class Landmark extends LinkedListEntry<Landmark>{
String? imageURL; // not final because it can be patched
final String? description;
final Duration? duration;
final bool? visited;
bool visited;
// Next node
// final Landmark? next;
@@ -46,7 +46,7 @@ final class Landmark extends LinkedListEntry<Landmark>{
this.imageURL,
this.description,
this.duration,
this.visited,
this.visited = false,
// this.next,
this.tripTime,
@@ -71,7 +71,7 @@ final class Landmark extends LinkedListEntry<Landmark>{
final imageURL = json['image_url'] as String?;
final description = json['description'] as String?;
var duration = Duration(minutes: json['duration'] ?? 0) as Duration?;
final visited = json['visited'] as bool?;
final visited = json['visited'] ?? false as bool;
var tripTime = Duration(minutes: json['time_to_reach_next'] ?? 0) as Duration?;
return Landmark(