native_page_route 1.0.0

SDKflutter
Platformandroidioswindowslinuxmacosweb

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',
);