backup. before shop update
This commit is contained in:
21
lib/models/category.dart
Normal file
21
lib/models/category.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
class Category {
|
||||
int id;
|
||||
String name;
|
||||
|
||||
Category.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'],
|
||||
name = json['name'];
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
};
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return json.encode(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user