mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: Add patch options (#1354)
This commit is contained in:
@ -9,6 +9,7 @@ class Patch {
|
||||
required this.description,
|
||||
required this.excluded,
|
||||
required this.compatiblePackages,
|
||||
required this.options,
|
||||
});
|
||||
|
||||
factory Patch.fromJson(Map<String, dynamic> json) => _$PatchFromJson(json);
|
||||
@ -16,6 +17,7 @@ class Patch {
|
||||
final String? description;
|
||||
final bool excluded;
|
||||
final List<Package> compatiblePackages;
|
||||
final List<Option> options;
|
||||
|
||||
Map<String, dynamic> toJson() => _$PatchToJson(this);
|
||||
|
||||
@ -33,8 +35,32 @@ class Package {
|
||||
|
||||
factory Package.fromJson(Map<String, dynamic> json) =>
|
||||
_$PackageFromJson(json);
|
||||
|
||||
final String name;
|
||||
final List<String> versions;
|
||||
|
||||
Map toJson() => _$PackageToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Option {
|
||||
Option({
|
||||
required this.key,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.value,
|
||||
required this.required,
|
||||
required this.optionClassType,
|
||||
});
|
||||
|
||||
factory Option.fromJson(Map<String, dynamic> json) => _$OptionFromJson(json);
|
||||
|
||||
final String key;
|
||||
final String title;
|
||||
final String description;
|
||||
dynamic value;
|
||||
final bool required;
|
||||
final String optionClassType;
|
||||
|
||||
Map toJson() => _$OptionToJson(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user