Add Hungarian English language switcher

This commit is contained in:
zsolt
2026-08-13 13:43:57 +02:00
parent 1b0734cf7b
commit aea92b0eed
8 changed files with 262 additions and 35 deletions
+6
View File
@@ -122,6 +122,7 @@ class AppJsonStore {
final settings = AppSettings(
people: defaultPeople(),
themeId: 'sage',
languageCode: defaultLanguageCode,
googleConnections: defaultGoogleConnections(),
syncedEvents: const [],
todoSuggestions: const [],
@@ -139,6 +140,7 @@ class AppJsonStore {
return AppSettings(
people: defaultPeople(),
themeId: 'sage',
languageCode: defaultLanguageCode,
googleConnections: defaultGoogleConnections(),
syncedEvents: const [],
todoSuggestions: const [],
@@ -160,6 +162,7 @@ class AppSettings {
AppSettings({
required this.people,
required this.themeId,
required this.languageCode,
required this.googleConnections,
required this.syncedEvents,
required this.todoSuggestions,
@@ -169,6 +172,7 @@ class AppSettings {
final List<Person> people;
final String themeId;
final String languageCode;
final List<GoogleCalendarConnection> googleConnections;
final List<CalendarEvent> syncedEvents;
final List<String> todoSuggestions;
@@ -191,6 +195,7 @@ class AppSettings {
)
: defaultPeople(),
themeId: json['themeId'] as String? ?? 'sage',
languageCode: json['languageCode'] == 'en' ? 'en' : defaultLanguageCode,
googleConnections: rawConnections is List
? rawConnections
.whereType<Map<String, dynamic>>()
@@ -218,6 +223,7 @@ class AppSettings {
Map<String, dynamic> toJson() => {
'themeId': themeId,
'languageCode': languageCode,
'people': people.map((person) => person.toJson()).toList(),
'googleConnections': googleConnections
.map((connection) => connection.toJson())