router_handler.dart 574 B

12345678910111213141516
  1. import 'package:fluro/fluro.dart';
  2. import '../views/index_page.dart';
  3. import '../views/map_page.dart';
  4. import '../views/deatilspage/details_page.dart';
  5. import '../views/settings_page.dart';
  6. Handler rootHandler = new Handler(handlerFunc: (_, params) => IndexPage());
  7. Handler detailHandler = new Handler(handlerFunc: (context, param) {
  8. String goodsId = param['id']?.first;
  9. return DetailsPage(goodsId: goodsId);
  10. });
  11. Handler mapHandler = new Handler(handlerFunc: (_, param) => MapPage());
  12. Handler settingHandler = new Handler(handlerFunc: (_, param) => SettingsPage());