checkRewardsCredited method

bool checkRewardsCredited(
  1. String challengeId,
  2. String milestoneId
)

Implementation

bool checkRewardsCredited(String challengeId, String milestoneId) {
  bool? check =
      _userData.where((element) => element.challengeId == challengeId).isEmpty
          ? false
          : _userData
              .where((element) => element.challengeId == challengeId)
              .first
              .milestonesData!
              .where((element) => element.milestoneId == milestoneId)
              .first
              .rewardsCredited;
  return check ?? false;
}