28 lines
564 B
Dart
28 lines
564 B
Dart
class MenuSection {
|
|
String name;
|
|
String type;
|
|
int order;
|
|
|
|
MenuSection({required this.name, required this.type, required this.order});
|
|
|
|
factory MenuSection.fromJson(Map<String, dynamic> json) {
|
|
return new MenuSection(
|
|
name: json['name'] as String,
|
|
type: json['type'] as String,
|
|
order: json['order'] as int,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toMap() {
|
|
return {
|
|
'name': name,
|
|
'type': type,
|
|
'order': order
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '{name: $name, type: $type, order: $order}';
|
|
}
|
|
} |