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.

22 lines
380B

  1. class Employee {
  2. int? id;
  3. String? name;
  4. Employee({
  5. this.id,
  6. this.name,
  7. });
  8. Employee.fromJson(Map<String, dynamic> json) {
  9. id = json['id'];
  10. name = json['fullName'];
  11. }
  12. Map<String, dynamic> toJson() {
  13. final Map<String, dynamic> data = new Map<String, dynamic>();
  14. data['id'] = this.id;
  15. data['fullName'] = this.name;
  16. return data;
  17. }
  18. }