| 1234567891011121314151617181920212223242526272829303132 |
- /// global instance
- final _Router router = _Router();
- class _Router {
- Set<String> imports = Set<String>();
- Map<String, Page> routerMap = <String, Page>{};
- }
- class Page {
- String path;
- String name;
- List<Argument> arguments;
- @override
- String toString() {
- return "{routerPath:${this.path},name:${this.name},arguments:${this.arguments.toString()}}";
- }
- }
- class Argument {
- String name;
- String type;
- bool isImported;
- bool required;
- Argument(this.name, this.type, this.required, {this.isImported=false});
- @override
- String toString() {
- return "{name:${this.name},type:${this.type},imported:${this.isImported},required:${this.required}}";
- }
- }
|