rework ui
This commit is contained in:
@@ -5,11 +5,12 @@ class PictureDto {
|
||||
final String? comment;
|
||||
final String? category;
|
||||
final String image;
|
||||
final int evaluation;
|
||||
final DateTime pictureDate;
|
||||
final String? username;
|
||||
|
||||
PictureDto(
|
||||
{required this.id, required this.comment, required this.category, required this.image, required this.pictureDate, required this.username});
|
||||
{required this.id, required this.comment, required this.category, required this.image, required this.evaluation, required this.pictureDate, required this.username});
|
||||
|
||||
/// Create from JSON response
|
||||
factory PictureDto.fromJson(Map<String, dynamic> json) {
|
||||
@@ -18,6 +19,7 @@ class PictureDto {
|
||||
comment: json['comment'] as String?,
|
||||
category: json['category'] as String?,
|
||||
image: json['image'] as String,
|
||||
evaluation: json["evaluation"] as int,
|
||||
pictureDate: DateTimeUtils.toDateTime(json['pictureDate']) ?? DateTime.now(),
|
||||
username: json['username'] as String?
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user