18 lines
359 B
Dart
18 lines
359 B
Dart
|
class Companies {
|
||
|
int id;
|
||
|
String name;
|
||
|
|
||
|
Companies({this.id, this.name});
|
||
|
|
||
|
Companies.fromJson(Map<String, dynamic> json) {
|
||
|
id = json['id'];
|
||
|
name = json['name'];
|
||
|
}
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
data['id'] = this.id;
|
||
|
data['name'] = this.name;
|
||
|
return data;
|
||
|
}
|
||
|
}
|