flouter 0.1.1
flouter: ^0.1.1

Flutter Android iOS web

A Flutter router that is based navigator 2.0 API and use Regexp to do path matching.

A Navigator 2.0 router for Flutter

Easy to use router library that do all the work for you !

Easy #

First create a MaterialApp.router :

return MaterialApp.router(
    title: 'Uri navigator App',
    routerDelegate: _routerDelegate,
    routeInformationParser: UriRouteInformationParser(),
);

Second initialize your _routerDelegate like this :

final _routerDelegate = UriRouterDelegate(
    pageNotFound: (routeInformation) => MaterialPage(
        key: ValueKey('not-found-page'),
        child: Scaffold(
        body: Center(
            child: Text('Page ${routeInformation.uri.path} not found'),
        ),
        ),
    ),
    initialUris: [
        Uri.parse('/'),
        Uri.parse('/test/titi/'),
    ],
    pages: {
        RegExp(r'^/$'): (_) => HomePage(),
        RegExp(r'^/test/([a-z]+)/$'): (routeInformation) => TestPage(routeInformation),
    },
);

That's all you have to do ;)

6
likes
110
pub points
29%
popularity

A Flutter router that is based navigator 2.0 API and use Regexp to do path matching.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

me@kleak.dev

License

MIT (LICENSE)

Dependencies

flutter, meta, provider

More

Packages that depend on flouter