native_page_route 1.0.0 copy "native_page_route: ^1.0.0" to clipboard
native_page_route: ^1.0.0 copied to clipboard

Wraps creation of native page route in simple function. Also provide function with preventing of creation the same route twice. Is fully tested on mobile.

Native page route #

Wraps creation of native page route in simple function. Also provide function with preventing of creation the same route twice. Is fully tested on mobile (Android/iOS).

Usage #

To use this plugin, add native_page_route as a dependency in your pubspec.yaml file.

Examples #

Here are small example that show you how to use this library.

Creation of native page route

// Creating a platform page route.
nativePageRoute(
    builder: (context) => const YourAwesomeScreen(),
    settings: RouteSettings(name: 'YourAwesomeScreenConstantName', arguments: SomeArguments()),
    maintainState: true,
    fullscreenDialog: true,
    iosTitle: 'Awesome',
);

// Creating an platform page route, that returns null if this screen already presented.
notRepeatableNativePageRoute(
    builder: (context) => const YourAwesomeScreen(),
    context: context,
    settings: RouteSettings(name: 'YourAwesomeScreenConstantName', arguments: SomeArguments()),
    maintainState: true,
    fullscreenDialog: true,
    iosTitle: 'Awesome',
);
4
likes
160
pub points
4%
popularity

Publisher

unverified uploader

Wraps creation of native page route in simple function. Also provide function with preventing of creation the same route twice. Is fully tested on mobile.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on native_page_route