Created
February 17, 2021 19:33
-
-
Save Abdulsametileri/c69fbe4426aa4e445f3edace3ceeb7cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InvoiceModel { | |
int id; | |
String date; | |
int amount; | |
InvoiceModel({this.id, this.date, this.amount}); | |
InvoiceModel.fromJson(Map<String, dynamic> json) { | |
id = json['id']; | |
date = json['date']; | |
amount = json['amount']; | |
} | |
Map<String, dynamic> toJson() { | |
final Map<String, dynamic> data = new Map<String, dynamic>(); | |
data['id'] = this.id; | |
data['date'] = this.date; | |
data['amount'] = this.amount; | |
return data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment