routes.dart 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * fluro
  3. * Created by Yakka
  4. * https://theyakka.com
  5. *
  6. * Copyright (c) 2019 Yakka, LLC. All rights reserved.
  7. * See LICENSE for distribution and usage details.
  8. */
  9. import 'package:fluro/fluro.dart';
  10. import 'package:flutter/material.dart';
  11. import './route_handlers.dart';
  12. class Routes {
  13. static String root = "/";
  14. static String demoSimple = "/demo";
  15. static String demoSimpleFixedTrans = "/demo/fixedtrans";
  16. static String demoFunc = "/demo/func";
  17. static String deepLink = "/message";
  18. static void configureRoutes(Router router) {
  19. router.notFoundHandler = Handler(
  20. handlerFunc: (BuildContext context, Map<String, List<String>> params) {
  21. print("ROUTE WAS NOT FOUND !!!");
  22. });
  23. router.define(root, handler: rootHandler);
  24. router.define(demoSimple, handler: demoRouteHandler);
  25. router.define(demoSimpleFixedTrans,
  26. handler: demoRouteHandler, transitionType: TransitionType.inFromLeft);
  27. router.define(demoFunc, handler: demoFunctionHandler);
  28. router.define(deepLink, handler: deepLinkHandler);
  29. }
  30. }