routers.dart 967 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:fluro/fluro.dart';
  2. import 'package:common_project/config/routers_path.dart';
  3. import 'package:common_project/utils/router_util/configure_routers.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:module_home/view/home_room_list_page.dart';
  6. import 'package:module_home/view/home_search_index_page.dart';
  7. class HomeRouters with RouterPath{
  8. String roomPage = "/roomPage";
  9. String searchIndex = "searchIndex";
  10. }
  11. class ModuleConfigRouters extends ConfigureRouters{
  12. @override
  13. void configureRouters(FluroRouter router) {
  14. // TODO: implement configureRouters
  15. // router.define(HomeRouters().roomPage, handler: roomPageHandler);
  16. router.define(HomeRouters().searchIndex, handler: HomeSearchIndexPageHandler);
  17. }
  18. Handler HomeSearchIndexPageHandler = Handler(
  19. type: HandlerType.route,
  20. handlerFunc: (BuildContext? context, Map<String, List<String>> parameters) {
  21. return HomeSearchIndexPage();
  22. },
  23. );
  24. }