init
This commit is contained in:
commit
e833bcaec4
224 files changed
+11812
No files matched your search
@@ -0,0 +1,35 @@
|
||||
class PlantVariety {
|
||||
final int id;
|
||||
final String type;
|
||||
final String quality;
|
||||
final String name;
|
||||
final String colour;
|
||||
|
||||
PlantVariety({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.quality,
|
||||
required this.name,
|
||||
required this.colour,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'type': type,
|
||||
'quality': quality,
|
||||
'name': name,
|
||||
'colour': colour,
|
||||
};
|
||||
}
|
||||
|
||||
factory PlantVariety.fromJson(Map<String, dynamic> json) {
|
||||
return PlantVariety(
|
||||
id: json['id'] as int,
|
||||
type: json['type'] as String,
|
||||
quality: json['quality'] as String,
|
||||
name: json['name'] as String,
|
||||
colour: json['colour'] as String,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user