universal_router

Creator: coderz1093

Last updated:

0 purchases

universal_router Image
universal_router Images
Add to Cart

Description:

universal router

universal_router #
This package is a implementation of Navigator 2.0. Supported Router Table concept.
Features #

Easy to use.
Router table concept.
Various parameter setting.

Install #
Install by adding this package to your pubspec.yaml:
dependencies:
universal_router: ^[latest version]
copied to clipboard
Usage #
Import #
import 'package:universal_router/route.dart';
copied to clipboard
Simple Example #

import 'package:universal_router/route.dart';



void main() {
final universalRouter = UniversalRouter.initialize();

RouteInstance(
routePath: "",
title: "Home",
pageBuilder: (_, __) async => Home());

runApp(
MaterialApp.router(
routerDelegate: universalRouter.routerDelegate,
routeInformationProvider: universalRouter.routeInformationProvider,
routeInformationParser: universalRouter.routerInformationParser,
));
}

class Home extends StatelessWidget {

@override
Widget build(BuildContext context) =>
TextButton(onPressed: () => {UniversalRouter.changePath("somewhere")},
child: Text('go to somewhere else'));

}


copied to clipboard
License #
Copyright © 2021, Jialin Li.
Released under the GNU AGPLv3.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.