Skip to content

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).

License

Notifications You must be signed in to change notification settings

idapgroup/native_page_route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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).

Resources

License

Stars

Watchers

Forks

Packages

No packages published