mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-05 04:40:37 +00:00
Added new safesearch settings
This commit is contained in:
parent
9e400f7efa
commit
0921576c19
9 changed files with 516 additions and 12 deletions
51
lib/models/safe_search.dart
Normal file
51
lib/models/safe_search.dart
Normal file
|
@ -0,0 +1,51 @@
|
|||
import 'package:adguard_home_manager/constants/enums.dart';
|
||||
|
||||
class SafeSearch {
|
||||
LoadStatus loadStatus = LoadStatus.loading;
|
||||
SafeSearchData? data;
|
||||
|
||||
SafeSearch({
|
||||
required this.loadStatus,
|
||||
this.data
|
||||
});
|
||||
}
|
||||
|
||||
class SafeSearchData {
|
||||
final bool enabled;
|
||||
final bool bing;
|
||||
final bool duckduckgo;
|
||||
final bool google;
|
||||
final bool pixabay;
|
||||
final bool yandex;
|
||||
final bool youtube;
|
||||
|
||||
SafeSearchData({
|
||||
required this.enabled,
|
||||
required this.bing,
|
||||
required this.duckduckgo,
|
||||
required this.google,
|
||||
required this.pixabay,
|
||||
required this.yandex,
|
||||
required this.youtube,
|
||||
});
|
||||
|
||||
factory SafeSearchData.fromJson(Map<String, dynamic> json) => SafeSearchData(
|
||||
enabled: json["enabled"],
|
||||
bing: json["bing"],
|
||||
duckduckgo: json["duckduckgo"],
|
||||
google: json["google"],
|
||||
pixabay: json["pixabay"],
|
||||
yandex: json["yandex"],
|
||||
youtube: json["youtube"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"enabled": enabled,
|
||||
"bing": bing,
|
||||
"duckduckgo": duckduckgo,
|
||||
"google": google,
|
||||
"pixabay": pixabay,
|
||||
"yandex": yandex,
|
||||
"youtube": youtube,
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue