Subscriber.fromJson constructor
Subscriber.fromJson( - Map<String, dynamic> json
)
Implementation
factory Subscriber.fromJson(Map<String, dynamic> json) {
return Subscriber(
uid: json['uid'],
referralCode: json['referralCode'],
isGlobalSalesPool: json['isGlobalSalesPool'],
isFounder: json['isFounder'],
isCorporate: json['isCorporate'],
wallet: json['wallet'],
founderShares: json['founderShares'],
parentId: json['parentId'],
createdAt: json['createdAt'] != null ? DateTime.parse(json['createdAt']) : null,
updatedAt: json['updatedAt'] != null ? DateTime.parse(json['updatedAt']) : null,
paymentAddress: json['paymentAddress'],
paymentAddressLinked: json['paymentAddressLinked'],
neoMilesWallet: json['neoMilesWallet'],
rank: json['rank'],
user: json['user'] != null ? User.fromJson(json['user']) : null,
subscriptions: json['subscriptions'] != null
? List<Subscription>.from(json['subscriptions'].map((x) => Subscription.fromJson(x)))
: null,
);
}