Skip to content
pubscout

short_navigation

2.5.5, released 7 weeks ago by an unverified publisher

Navigate between routes, show dialogs, and access context globally without passing BuildContext.

WASM-ready
$ flutter pub add short_navigation
Source repository

What it does

Provides global navigation methods, animated transitions, dialog/bottom sheet helpers, and global access to context-dependent objects like MediaQuery, Theme, and ScaffoldMessenger without requiring a BuildContext instance.

AI-written summary of version 2.5.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want a lightweight imperative navigation setup without writing complex routing declarations
  • You need to navigate or show dialogs/snackbars from non-widget classes where BuildContext is unavailable

Skip it when

  • You prefer declarative routing with deep linking support
  • You rely on type-safe argument passing and route generation structures

Strengths

  • Enables navigation and messenger calls from anywhere without BuildContext
  • Includes built-in support for animated page transitions and custom route types

Weaknesses

  • Relies on a global navigator key, which can cause issues in multi-navigator or complex modular architectures
  • Does not support declarative routing or native deep linking features out of the box

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Pass Go.navigatorKey to the navigatorKey property of MaterialApp in main.dart.

MaterialApp(
  navigatorKey: Go.navigatorKey,
  home: const HomePage(),
);

// Anywhere in your code:
Go.to(HomePage());

Alternatives

Packages that do the same job and could replace short_navigation.

  • go_router

    Choose go_router for robust declarative routing, URL path synchronization, and deep linking support.

  • auto_route

    Choose auto_route for heavily type-safe routing and deep linking with code generation.