ui_router 1.0.3 copy "ui_router: ^1.0.3" to clipboard
ui_router: ^1.0.3 copied to clipboard

outdated

Super Simple, Minimal, Lightweight Router. Easy to use and organize the pages on your application.

Header

Simple UI Router #

https://pub.dev/packages/ui_router

router #

final router = UiRouter(
  pages: [
    UiPage(
      id: Pages.A,
      build: (params) => PageA(),
    ),
    UiPage(
      id: Pages.B,
      build: (params) => PageB(params['message']),
    ),
    // ...this is all pages in my app
  ],
);

use as a widget (start with page A) #

router.widget()

push (go to page B) #

router.push('B');

push with params #

router.push('B', params: {'message': 'HELLO😁'});

pop (back one page) #

router.pop();

pop until the specified page #

router.popTo('O');

do something before every push #

router.willPush((left, right) {
  // always allow push
  return true;
});

do something before every pop #

router.willPop((left, right) {
  // always allow pop
  return true;
});

see the page IDs stack #

print(router.stack());

πŸ˜„ Using Navigator 2.0
πŸŽ‰ Contributions are welcomed!

0
likes
0
pub points
0%
popularity

Publisher

verified publisherflut.rbdog.biz

Super Simple, Minimal, Lightweight Router. Easy to use and organize the pages on your application.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ui_router