router_handler.dart 558 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 = Handler(handlerFunc: (_, params) => IndexPage());
  7. Handler detailHandler = Handler(handlerFunc: (context, param) {
  8. String goodsId = param['id']?.first;
  9. return DetailsPage(goodsId: goodsId);
  10. });
  11. Handler mapHandler = Handler(handlerFunc: (_, param) => MapPage());
  12. Handler settingHandler = Handler(handlerFunc: (_, param) => SettingsPage());