sailor_plus 1.0.1 copy "sailor_plus: ^1.0.1" to clipboard
sailor_plus: ^1.0.1 copied to clipboard

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

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.0
copied to clipboard

Next, import 'sailor_plus.dart'

import 'package:sailor_plus/sailor_plus.dart';
copied to clipboard

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

MaterialApp(
navigatorKey: Sailor.navigatorKey,
)
copied to clipboard

Screens navigation #

To navigate to another screen or page:

Sailor.to(AnotherPage());
copied to clipboard

Named Routes navigation #

To navigate using named routes:

Sailor.toNamed("new_route");
copied to clipboard

Go back #

To go back to the previous page or route:

Sailor.back();
copied to clipboard
5
likes
160
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.07 - 2025.02.19

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

Homepage

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on sailor_plus