mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-15 03:04:25 +08:00

1.views 文件夹里面分类,页面相关文件;2.公共组件全部放在components里;3.创建resources文件夹放置资源dart文件4.修改二级菜单文字大小 BREAKING CHANGE: 重构,建议删除本地db,再编译
43 lines
1.3 KiB
Dart
43 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:fluro/fluro.dart';
|
|
import 'package:flutter_go/components/category.dart';
|
|
import '../widgets/404.dart';
|
|
import 'package:flutter_go/components/full_screen_code_dialog.dart';
|
|
import 'package:flutter_go/views/web_page/web_view_page.dart';
|
|
import 'package:flutter_go/views/first_page/home.dart';
|
|
|
|
// app的首页
|
|
var homeHandler = new Handler(
|
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
|
return new AppPage();
|
|
},
|
|
);
|
|
|
|
var categoryHandler = new Handler(
|
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
|
String name = params["type"]?.first;
|
|
|
|
return new CategoryHome(name);
|
|
},
|
|
);
|
|
|
|
var widgetNotFoundHandler = new Handler(
|
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
|
return new WidgetNotFound();
|
|
});
|
|
|
|
var fullScreenCodeDialog = new Handler(
|
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
|
String path = params['filePath']?.first;
|
|
return new FullScreenCodeDialog(
|
|
filePath: path,
|
|
);
|
|
});
|
|
|
|
var webViewPageHand = new Handler(
|
|
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
|
String title = params['title']?.first;
|
|
String url = params['url']?.first;
|
|
return new WebViewPage(url, title);
|
|
});
|