Challenge getChallengeByType(String type) { return challenges!.firstWhere((element) => element.type == type); }