Thomas Fransolet fe6fe9edc5 Clean code
2021-07-26 18:52:33 +02:00

27 lines
529 B
Dart

import 'package:manager_app/Models/menuSection.dart';
class Menu {
String title;
List<MenuSection> sections;
Menu({this.title, this.sections});
factory Menu.fromJson(Map<String, dynamic> json) {
return new Menu(
title: json['title'] as String,
sections: json['sections'] as List<MenuSection>,
);
}
Map<String, dynamic> toMap() {
return {
'title': title,
'sections': sections
};
}
@override
String toString() {
return '{title: $title, sections: $sections}';
}
}