Feature "Wunschziel für heute" entfernen und BWV-Seite ergänzen

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>
This commit is contained in:
SvenandClaude Opus 4.8 committed 2026-06-24 08:11:54 +02:00
1 parent 10b3a647e7
commit e36fc69edc
12 files changed
+626 -278

No files matched your search

@@ -0,0 +1,44 @@
/// 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;
}
}
@@ -1,15 +0,0 @@
import 'package:json_annotation/json_annotation.dart';
part 'set_desired_zip_message.g.dart';
@JsonSerializable()
class SetDesiredZipMessage {
@JsonKey(name: "desired_zip")
late String desiredZip;
SetDesiredZipMessage();
factory SetDesiredZipMessage.fromJson(Map<String, dynamic> json) => _$SetDesiredZipMessageFromJson(json);
Map<String, dynamic> toJson() => _$SetDesiredZipMessageToJson(this);
}
@@ -1,17 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'set_desired_zip_message.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SetDesiredZipMessage _$SetDesiredZipMessageFromJson(
Map<String, dynamic> json) =>
SetDesiredZipMessage()..desiredZip = json['desired_zip'] as String;
Map<String, dynamic> _$SetDesiredZipMessageToJson(
SetDesiredZipMessage instance) =>
<String, dynamic>{
'desired_zip': instance.desiredZip,
};
@@ -4,9 +4,6 @@ part 'start_session_message.g.dart';
@JsonSerializable()
class StartSessionMessage {
@JsonKey(name: "desired_zip")
late String desiredZip;
StartSessionMessage();
factory StartSessionMessage.fromJson(Map<String, dynamic> json) => _$StartSessionMessageFromJson(json);
@@ -7,10 +7,8 @@ part of 'start_session_message.dart';
// **************************************************************************
StartSessionMessage _$StartSessionMessageFromJson(Map<String, dynamic> json) =>
StartSessionMessage()..desiredZip = json['desired_zip'] as String;
StartSessionMessage();
Map<String, dynamic> _$StartSessionMessageToJson(
StartSessionMessage instance) =>
<String, dynamic>{
'desired_zip': instance.desiredZip,
};
<String, dynamic>{};