Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
19
lib/models/rating_course_model.dart
Normal file
19
lib/models/rating_course_model.dart
Normal file
@ -0,0 +1,19 @@
|
||||
class Rating {
|
||||
Rating({
|
||||
this.totalReview,
|
||||
this.avgRating,
|
||||
});
|
||||
|
||||
String? totalReview;
|
||||
int? avgRating;
|
||||
|
||||
factory Rating.fromJson(Map<String, dynamic> json) => Rating(
|
||||
totalReview: json["total_review"],
|
||||
avgRating: json["avg_rating"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"total_review": totalReview,
|
||||
"avg_rating": avgRating,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user