Rewards.fromJson constructor

Rewards.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Rewards.fromJson(Map<String, dynamic> json) {
  milestones = json['milestones'].cast<String>();
  if (json['tokens'] != null) {
    tokens = <Tokens>[];
    json['tokens'].forEach((v) {
      tokens!.add(Tokens.fromJson(v));
    });
  }
  sId = json['_id'];
}