30 lines
572 B
Dart
30 lines
572 B
Dart
import 'dart:io';
|
|
import 'dart:ui' as ui;
|
|
|
|
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}';
|
|
}
|
|
} |