Listing.fromJson constructor
Listing.fromJson(
- Object? json
Implementation
factory Listing.fromJson(Object? json) {
final j = json as Map<String, dynamic>? ?? {};
return Listing(
id: j['id'].toString(),
name: j['name'],
homepage: j['homepage'],
imageId: j['image_id'],
order: j['order'],
mobileLink: j['mobile_link'],
desktopLink: j['desktop_link'],
webappLink: j['webapp_link'],
linkMode: j['link_mode'],
appStore: j['app_store'],
playStore: j['play_store'],
rdns: j['rdns'],
injected: j['injected'] == null
? []
: List<Injected>.from(
j['injected']!.map((x) => Injected.fromJson(x)),
),
);
}