dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+7 -2
View File
@@ -8,8 +8,13 @@ class DevToolsSettings {
bool checkerboardOffscreenLayers;
bool checkerboardRasterCacheImages;
DevToolsSettings({required this.showPerformanceOverlay, required this.checkerboardOffscreenLayers, required this.checkerboardRasterCacheImages});
DevToolsSettings({
required this.showPerformanceOverlay,
required this.checkerboardOffscreenLayers,
required this.checkerboardRasterCacheImages,
});
factory DevToolsSettings.fromJson(Map<String, dynamic> json) => _$DevToolsSettingsFromJson(json);
factory DevToolsSettings.fromJson(Map<String, dynamic> json) =>
_$DevToolsSettingsFromJson(json);
Map<String, dynamic> toJson() => _$DevToolsSettingsToJson(this);
}
+7 -2
View File
@@ -11,8 +11,13 @@ class FileSettings {
bool ascending;
SortOption sortBy;
FileSettings({required this.sortFoldersToTop, required this.ascending, required this.sortBy});
FileSettings({
required this.sortFoldersToTop,
required this.ascending,
required this.sortBy,
});
factory FileSettings.fromJson(Map<String, dynamic> json) => _$FileSettingsFromJson(json);
factory FileSettings.fromJson(Map<String, dynamic> json) =>
_$FileSettingsFromJson(json);
Map<String, dynamic> toJson() => _$FileSettingsToJson(this);
}
+2 -1
View File
@@ -8,6 +8,7 @@ class FileViewSettings {
FileViewSettings({required this.alwaysOpenExternally});
factory FileViewSettings.fromJson(Map<String, dynamic> json) => _$FileViewSettingsFromJson(json);
factory FileViewSettings.fromJson(Map<String, dynamic> json) =>
_$FileViewSettingsFromJson(json);
Map<String, dynamic> toJson() => _$FileViewSettingsToJson(this);
}
+6 -2
View File
@@ -7,8 +7,12 @@ class HolidaysSettings {
bool dismissedDisclaimer;
bool showPastEvents;
HolidaysSettings({required this.dismissedDisclaimer, required this.showPastEvents});
HolidaysSettings({
required this.dismissedDisclaimer,
required this.showPastEvents,
});
factory HolidaysSettings.fromJson(Map<String, dynamic> json) => _$HolidaysSettingsFromJson(json);
factory HolidaysSettings.fromJson(Map<String, dynamic> json) =>
_$HolidaysSettingsFromJson(json);
Map<String, dynamic> toJson() => _$HolidaysSettingsToJson(this);
}
+2 -1
View File
@@ -18,6 +18,7 @@ class ModulesSettings {
this.fixedBottomBarSlots = 3,
});
factory ModulesSettings.fromJson(Map<String, dynamic> json) => _$ModulesSettingsFromJson(json);
factory ModulesSettings.fromJson(Map<String, dynamic> json) =>
_$ModulesSettingsFromJson(json);
Map<String, dynamic> toJson() => _$ModulesSettingsToJson(this);
}
+6 -2
View File
@@ -7,8 +7,12 @@ class NotificationSettings {
bool askUsageDismissed;
bool enabled;
NotificationSettings({required this.askUsageDismissed, required this.enabled});
NotificationSettings({
required this.askUsageDismissed,
required this.enabled,
});
factory NotificationSettings.fromJson(Map<String, dynamic> json) => _$NotificationSettingsFromJson(json);
factory NotificationSettings.fromJson(Map<String, dynamic> json) =>
_$NotificationSettingsFromJson(json);
Map<String, dynamic> toJson() => _$NotificationSettingsToJson(this);
}
+5 -6
View File
@@ -14,10 +14,7 @@ part 'settings.g.dart';
@JsonSerializable(explicitToJson: true)
class Settings {
@JsonKey(
toJson: _themeToJson,
fromJson: _themeFromJson,
)
@JsonKey(toJson: _themeToJson, fromJson: _themeFromJson)
ThemeMode appTheme;
bool devToolsEnabled;
@@ -44,8 +41,10 @@ class Settings {
});
static String _themeToJson(ThemeMode m) => m.name;
static ThemeMode _themeFromJson(String m) => ThemeMode.values.firstWhere((element) => element.name == m);
static ThemeMode _themeFromJson(String m) =>
ThemeMode.values.firstWhere((element) => element.name == m);
factory Settings.fromJson(Map<String, dynamic> json) => _$SettingsFromJson(json);
factory Settings.fromJson(Map<String, dynamic> json) =>
_$SettingsFromJson(json);
Map<String, dynamic> toJson() => _$SettingsToJson(this);
}
+8 -2
View File
@@ -9,8 +9,14 @@ class TalkSettings {
Map<String, String> drafts;
Map<String, int> draftReplies;
TalkSettings({required this.sortFavoritesToTop, required this.sortUnreadToTop, required this.drafts, required this.draftReplies});
TalkSettings({
required this.sortFavoritesToTop,
required this.sortUnreadToTop,
required this.drafts,
required this.draftReplies,
});
factory TalkSettings.fromJson(Map<String, dynamic> json) => _$TalkSettingsFromJson(json);
factory TalkSettings.fromJson(Map<String, dynamic> json) =>
_$TalkSettingsFromJson(json);
Map<String, dynamic> toJson() => _$TalkSettingsToJson(this);
}
+2 -1
View File
@@ -14,6 +14,7 @@ class TimetableSettings {
required this.timetableNameMode,
});
factory TimetableSettings.fromJson(Map<String, dynamic> json) => _$TimetableSettingsFromJson(json);
factory TimetableSettings.fromJson(Map<String, dynamic> json) =>
_$TimetableSettingsFromJson(json);
Map<String, dynamic> toJson() => _$TimetableSettingsToJson(this);
}