Merge branch 'beta' into beta2

This commit is contained in:
Fiona
2019-06-28 11:25:00 +08:00
committed by GitHub
8 changed files with 257 additions and 25 deletions

View File

@ -9,6 +9,9 @@ import 'package:flutter_go/views/home.dart';
import 'package:flutter_go/views/login_page/login_page.dart';
import 'package:flutter_go/model/user_info.dart';
import 'package:flutter_go/views/issuse_message_page/issuse_message_page.dart';
import 'package:flutter_go/views/collection_page/collection_page.dart';
import 'package:flutter_go/views/collection_page/collection_full_page.dart';
// app的首页
var homeHandler = new Handler(
@ -17,6 +20,20 @@ var homeHandler = new Handler(
},
);
var collectionFullHandler = new Handler(
handlerFunc: (BuildContext context,Map<String,List<String>> params){
bool hasLogined = params['hasLogin']?.first == 'true';
return CollectionFullPage(hasLogined: hasLogined);
}
);
var collectionHandler = new Handler(
handlerFunc: (BuildContext context,Map<String,List<String>> params){
bool hasLogined = params['hasLogin']?.first == 'true';
return CollectionPage(hasLogined: hasLogined);
}
);
var categoryHandler = new Handler(
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
String name = params["type"]?.first;

View File

@ -14,6 +14,8 @@ class Routes {
static String webViewPage = '/web-view-page';
static String loginPage = '/loginpage';
static String issuesMessage='/issuesMessage';
static String collectionPage = '/collection-page';
static String collectionFullPage = '/collection-full-page';
static void configureRoutes(Router router) {
List widgetDemosList = new WidgetDemoList().getDemos();
@ -21,7 +23,8 @@ class Routes {
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
});
router.define(home, handler: homeHandler);
router.define(collectionPage,handler:collectionHandler);
router.define(collectionFullPage,handler:collectionFullHandler);
router.define('/category/:type', handler: categoryHandler);
router.define('/category/error/404', handler: widgetNotFoundHandler);
router.define(loginPage, handler: loginPageHandler);