add project
This commit is contained in:
25
lib/model/CategoryResponse.dart
Normal file
25
lib/model/CategoryResponse.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
class CategoryResponse {
|
||||
|
||||
CategoryResponse({
|
||||
this.id,
|
||||
this.code,
|
||||
this.name
|
||||
});
|
||||
|
||||
|
||||
|
||||
int id;
|
||||
String code;
|
||||
String name;
|
||||
Map<String,dynamic> config;
|
||||
|
||||
static CategoryResponse fromResponse(dynamic result){
|
||||
return CategoryResponse(
|
||||
id: int.parse(result["id"]),
|
||||
code: result["code"],
|
||||
name: result["name"]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user