routes.dart 889 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * fluro
  3. * A Posse Production
  4. * http://goposse.com
  5. * Copyright (c) 2018 Posse Productions LLC. All rights reserved.
  6. * See LICENSE for distribution and usage details.
  7. */
  8. import 'package:fluro/fluro.dart';
  9. import 'package:flutter/material.dart';
  10. import './route_handlers.dart';
  11. class Routes {
  12. static String root = "/";
  13. static String demoSimple = "/demo";
  14. static String demoFunc = "/demo/func";
  15. static String deepLink = "/message";
  16. static void configureRoutes(Router router) {
  17. router.notFoundHandler = new Handler(
  18. handlerFunc: (BuildContext context, Map<String, List<String>> params) {
  19. print("ROUTE WAS NOT FOUND !!!");
  20. });
  21. router.define(root, handler: rootHandler);
  22. router.define(demoSimple, handler: demoRouteHandler);
  23. router.define(demoFunc, handler: demoFunctionHandler);
  24. router.define(deepLink, handler: deepLinkHandler);
  25. }
  26. }