Add Hungarian English language switcher
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user