ReviewDto.fromJson constructor

ReviewDto.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ReviewDto.fromJson(Map<String, dynamic> json) {
  return ReviewDto(
    authorName: json["authorName"] as String,
    authorUrl: json["authorUrl"] as String?,
    profilePhotoUrl: json["profilePhotoUrl"] as String?,
    rating: json["rating"] as int,
    text: json["text"] as String?,
    time: DateTime.parse(json["time"] as String),
  );
}