fromMap static method

CallStatistics? fromMap(
  1. Map<Object?, Object?>? callStatisticsMap
)

Factory method to construct CallStatistics from dictionary

Implementation

static CallStatistics? fromMap(Map<Object?, Object?>? callStatisticsMap) {
  if(callStatisticsMap == null) {
    return null;
  }
  return CallStatistics (
    maxRating: (callStatisticsMap.containsKey("maxRating")) ? callStatisticsMap["maxRating"] as double : -1.0,
    minRating: (callStatisticsMap.containsKey("minRating")) ? callStatisticsMap["minRating"] as double : -1.0,
    averageRating: (callStatisticsMap.containsKey("averageRating")) ? callStatisticsMap["averageRating"] as double : -1.0,
    currentRating: (callStatisticsMap.containsKey("currentRating")) ? callStatisticsMap["currentRating"] as double : -1.0,
  );
}