UserDetails.fromJson constructor
UserDetails.fromJson(
- Map<String, dynamic> json
)
Implementation
UserDetails.fromJson(Map<String, dynamic> json) {
sId = json['_id'];
wallet =
json['wallet'] != null ? new Wallet.fromJson(json['wallet']) : null;
// if (json['usedCoupons'] != null) {
// usedCoupons = <Null>[];
// json['usedCoupons'].forEach((v) {
// usedCoupons!.add(new Null.fromJson(v));
// });
// }
// if (json['ampReaderIds'] != null) {
// ampReaderIds = <Null>[];
// json['ampReaderIds'].forEach((v) {
// ampReaderIds!.add(new Null.fromJson(v));
// });
// }
phoneNumber = json['phoneNumber'];
lastPurchasedOn = json['lastPurchasedOn'];
country = json['country'];
userCurrency = json['userCurrency'];
name = json['name'];
}