CRUD working
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
// quote model class
|
||||
|
||||
class Quote{
|
||||
final int index;
|
||||
final int id;
|
||||
final String author;
|
||||
final String body;
|
||||
|
||||
const Quote({
|
||||
required this.index,
|
||||
required this.id,
|
||||
required this.author,
|
||||
required this.body,
|
||||
});
|
||||
|
||||
factory Quote.fromJson(Map<String, dynamic> json) {
|
||||
return Quote(
|
||||
id: json['id'],
|
||||
author: json['author'],
|
||||
body: json['body'],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user