flutter_dipnav 1.0.0-dev.1 copy "flutter_dipnav: ^1.0.0-dev.1" to clipboard
flutter_dipnav: ^1.0.0-dev.1 copied to clipboard

discontinued
outdated

Advanced navigation based on Navigator 2.0

flutter_dipnav #

Advanced navigation based on Navigator 2.0

Using #

Go to the next route

context.dipNav.push(
    path: '/',
    child: MyHomePage(title: 'Home Page'));

Go to the previous route

context.dipNav.pop();

Getting Started #

Add dependencies

dependencies:
  ...
  flutter_dipnav: ^1.0.0-dev.1

Create instance of [DipNavRouter], like this

final dipNav = DipNavRouter(
  initRoute: DipNavRoute(
      path: '/',
      child: MyHomePage(
        title: 'Home Page 1',
      )),
  notFoundRoute: DipNavRoute(
      path: '/404',
      child: MyHomePage(
        title: 'Error 404 - Not found page',
      )),
);

Add the [DipNav] widget to the source, like this

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    ...
    return DipNav(
      router: dipNav,
      child: MaterialApp.router(
        title: 'Flutter Demo',
        ...
        routerDelegate: dipNav.delegate,
        routeInformationParser: dipNav.parser,
        backButtonDispatcher: dipNav.dispatcher,
      ),
    );
  }
}
Please check the example

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Authors #

This project developed by DipDev Studio Team: @Dimoshka