RatingModel.fromJson constructor
Creates a RatingModel instance from a JSON object.
The json parameter is a map representing the JSON object.
Returns a RatingModel instance.
Implementation
factory RatingModel.fromJson(Map<String, dynamic> json) {
return RatingModel(
rate: (json['rate'] ?? 0) as num,
count: (json['count'] ?? 0) as num,
);
}