getSurveyInfoFromMap method
Implementation
SurveyInfo? getSurveyInfoFromMap(dynamic map) {
if (map == null || map.isEmpty) {
return null;
}
return SurveyInfo(
surveyCPA: (map.containsKey("surveyCPA") && map["surveyCPA"] is int)
? map["surveyCPA"]
: null,
surveyLOI: (map.containsKey("surveyLOI") && map["surveyLOI"] is int)
? map["surveyLOI"]
: null,
surveyIR: (map.containsKey("surveyIR") && map["surveyIR"] is int)
? map["surveyIR"]
: null,
surveyClass:
(map.containsKey("surveyClass") && map["surveyClass"] is String)
? map["surveyClass"]
: null,
rewardName:
(map.containsKey("rewardName") && map["rewardName"] is String)
? map["rewardName"]
: null,
rewardValue:
(map.containsKey("rewardValue") && map["rewardValue"] is int)
? map["rewardValue"]
: null,
remainingCompletes: (map.containsKey("remainingCompletes") &&
map["remainingCompletes"] is int)
? map["remainingCompletes"]
: null);
}