Skip to content

heda217/sailor_plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sailor Plus

This package lets you navigate through screens and named routes without context in Flutter.

anchor image

License: GNU pub_package

Getting started

add sailor_plus as a dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  sailor_plus: 1.0.1

Next, import 'sailor_plus.dart'

import 'package:sailor_plus/sailor_plus.dart';

and finally make sure to set navigatorKey in your main.dart

MaterialApp(
navigatorKey: Sailor.navigatorKey,
)

Screens navigation

To navigate to another screen or page:

Sailor.to(AnotherPage());

Named Routes navigation

To navigate using named routes:

Sailor.toNamed("new_route");

Go back

To go back to the previous page or route:

Sailor.back();

About

Routes navigation without context in Flutter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published