Created
July 9, 2018 08:54
-
-
Save xrnd/fddc3d7c9521374348b27db0e80ede98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:fluro/fluro.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutterstart/view/FutureWidgetView.dart'; | |
| import 'package:flutterstart/view/LayoutWidgetView.dart'; | |
| import 'package:flutterstart/view/StateWidgetView.dart'; | |
| final String homeRoute = '/home'; | |
| final String stateRoute = '/state'; | |
| final String layoutRoute = '/layout'; | |
| final String futureRoute = '/future'; | |
| class Routes { | |
| static void configureRoutes(Router router) { | |
| router.notFoundHandler = new Handler( | |
| handlerFunc: (BuildContext context, Map<String, List<String>> params) { | |
| print("ROUTE WAS NOT FOUND !!!"); | |
| }); | |
| /// ROUTES FOR Widgets | |
| router.define(stateRoute, handler: new Handler( | |
| handlerFunc: (BuildContext context, Map<String, List<String>> params) { | |
| return new StateWidgetView(); | |
| })); | |
| router.define(layoutRoute, handler: new Handler( | |
| handlerFunc: (BuildContext context, Map<String, List<String>> params) { | |
| return new LayoutWidgetView(); | |
| })); | |
| router.define(futureRoute, handler: new Handler( | |
| handlerFunc: (BuildContext context, Map<String, List<String>> params) { | |
| return new FutureWidgetView(); | |
| })); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment