EarnedReward.fromJson constructor

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

Factory constructor to create an instance from JSON.

Implementation

factory EarnedReward.fromJson(Map<String, dynamic> json) {
  return EarnedReward(
    id: json['id'] as int?,
    rewardId: json['rewardId'] as int?,
    rewardCode: json['rewardCode'] as String?,
    title: json['title'] as String?,
    description: json['description'] as String?,
    points: json['points'] as int?,
    earnedOn: json['earnedOn'] as String?,
  );
}