feat: remember delete task option (#542)

This commit is contained in:
Levi authored and GitHub committed 2024-05-17 18:43:21 +08:00
1 parent a89c55b5c4
commit 0583e4aaa6
11 files changed
+120 -42

No files matched your search

@@ -17,6 +17,7 @@ class DownloaderConfig {
factory DownloaderConfig.fromJson(Map<String, dynamic> json) =>
_$DownloaderConfigFromJson(json);
Map<String, dynamic> toJson() => _$DownloaderConfigToJson(this);
}
@@ -29,6 +30,7 @@ class ProtocolConfig {
factory ProtocolConfig.fromJson(Map<String, dynamic>? json) =>
json == null ? ProtocolConfig() : _$ProtocolConfigFromJson(json);
Map<String, dynamic> toJson() => _$ProtocolConfigToJson(this);
}
@@ -47,6 +49,7 @@ class HttpConfig {
factory HttpConfig.fromJson(Map<String, dynamic> json) =>
_$HttpConfigFromJson(json);
Map<String, dynamic> toJson() => _$HttpConfigToJson(this);
}
@@ -59,19 +62,27 @@ class BtConfig {
factory BtConfig.fromJson(Map<String, dynamic> json) =>
_$BtConfigFromJson(json);
Map<String, dynamic> toJson() => _$BtConfigToJson(this);
}
@JsonSerializable(explicitToJson: true)
class ExtraConfig {
String themeMode = '';
String locale = '';
String themeMode;
String locale;
bool lastDeleteTaskKeep;
ExtraConfigBt bt = ExtraConfigBt();
ExtraConfig();
ExtraConfig({
this.themeMode = '',
this.locale = '',
this.lastDeleteTaskKeep = false,
});
factory ExtraConfig.fromJson(Map<String, dynamic>? json) =>
json == null ? ExtraConfig() : _$ExtraConfigFromJson(json);
Map<String, dynamic> toJson() => _$ExtraConfigToJson(this);
}
@@ -112,5 +123,6 @@ class ExtraConfigBt {
factory ExtraConfigBt.fromJson(Map<String, dynamic> json) =>
_$ExtraConfigBtFromJson(json);
Map<String, dynamic> toJson() => _$ExtraConfigBtToJson(this);
}