Entfernt den Button und die komplette Funktionalität "Wunschziel für heute" (desired_zip): Seite, Netzwerk-Nachricht, Preference-Konstante, Übermittlung beim Session-Start sowie alle Übersetzungen. Ergänzt die neue BWV-Seite samt SetBwvLocationMessage und preferencesRemove-Helfer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.0 KiB
Dart
45 lines
1.0 KiB
Dart
/// Zeitfenster mit Postleitzahl für das Setzen der BWV-Location.
|
|
class BwvTimeWindow {
|
|
final int fromUtc;
|
|
final int toUtc;
|
|
final String postalCode;
|
|
|
|
BwvTimeWindow({
|
|
required this.fromUtc,
|
|
required this.toUtc,
|
|
required this.postalCode,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'fromUtc': fromUtc,
|
|
'toUtc': toUtc,
|
|
'postalCode': postalCode,
|
|
};
|
|
}
|
|
|
|
/// Payload für das Topic `set_bwv_location`.
|
|
class SetBwvLocationMessage {
|
|
final int timestamp;
|
|
final BwvTimeWindow? availabilityStart;
|
|
final BwvTimeWindow? bwvLocationPreference;
|
|
|
|
SetBwvLocationMessage({
|
|
required this.timestamp,
|
|
this.availabilityStart,
|
|
this.bwvLocationPreference,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{'timestamp': timestamp};
|
|
|
|
if (availabilityStart != null) {
|
|
map['availabilityStart'] = availabilityStart!.toJson();
|
|
}
|
|
if (bwvLocationPreference != null) {
|
|
map['bwvLocationPreference'] = bwvLocationPreference!.toJson();
|
|
}
|
|
|
|
return map;
|
|
}
|
|
}
|