class MenuSection { String name; String type; int order; MenuSection({this.name, this.type, this.order}); factory MenuSection.fromJson(Map json) { return new MenuSection( name: json['name'] as String, type: json['type'] as String, order: json['order'] as int, ); } Map toMap() { return { 'name': name, 'type': type, 'order': order }; } @override String toString() { return '{name: $name, type: $type, order: $order}'; } }