GlassfyStoresInfo.fromJson constructor
GlassfyStoresInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GlassfyStoresInfo.fromJson(Map<String, dynamic> json) {
return GlassfyStoresInfo(
(json['all'] as List<dynamic>?)?.map<GlassfyStoreInfo>((e) {
final store = e['store'] as int?;
if (store == glassfyStoreToInt(GlassfyStore.storePaddle)) {
return GlassfyStoreInfoPaddle.fromJson(e as Map<String, dynamic>);
} else {
return GlassfyStoreInfo.fromJson(e as Map<String, dynamic>);
}
}).toList());
}