Sonnat Project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
615 B

class Post {
int id;
String name;
String description;
String image;
int date;
Post({
required this.description,
required this.name,
required this.image,
required this.id,
required this.date,
});
factory Post.fromJson(Map<String, dynamic> json) {
return Post(
name: json['name'],
image: json['image'],
description: json['description'],
id: json['id'],
date: json['date'],
);
}
Post copyWith(int date) {
return Post(
description: description,
name: name,
image: image,
id: id,
date: date,
);
}
}