mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 02:41:39 +00:00
first commit
This commit is contained in:
60
model/source.dart
Normal file
60
model/source.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
class Source {
|
||||
String? id;
|
||||
String? name;
|
||||
|
||||
String? baseUrl;
|
||||
|
||||
String? lang;
|
||||
|
||||
bool? isNsfw;
|
||||
|
||||
String? sourceCodeUrl;
|
||||
|
||||
String? typeSource;
|
||||
|
||||
String? iconUrl;
|
||||
|
||||
bool? hasCloudflare;
|
||||
|
||||
String? dateFormat;
|
||||
|
||||
String? dateFormatLocale;
|
||||
|
||||
String? apiUrl;
|
||||
|
||||
String? version;
|
||||
|
||||
Source({
|
||||
this.id = null,
|
||||
this.name = "",
|
||||
this.baseUrl = "",
|
||||
this.lang = "",
|
||||
this.typeSource = "",
|
||||
this.iconUrl = "",
|
||||
this.dateFormat,
|
||||
this.dateFormatLocale,
|
||||
this.isNsfw = false,
|
||||
this.hasCloudflare = false,
|
||||
this.sourceCodeUrl = "",
|
||||
this.apiUrl = "",
|
||||
this.version = "",
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'name': name,
|
||||
'id': id ?? 'mangayomi-$lang.$name'.hashCode,
|
||||
'baseUrl': baseUrl,
|
||||
"lang": lang,
|
||||
"typeSource": typeSource,
|
||||
"iconUrl": iconUrl,
|
||||
"dateFormat": dateFormat,
|
||||
"dateFormatLocale": dateFormatLocale,
|
||||
"isNsfw": isNsfw,
|
||||
"hasCloudflare": hasCloudflare,
|
||||
"sourceCodeUrl": sourceCodeUrl,
|
||||
"apiUrl": apiUrl,
|
||||
"version": version
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user