Skip to content
pubscout

flutter_redux_navigation

0.7.1, released 5 years ago by flutterings.dev

A Redux middleware that enables navigation actions in Flutter apps.

WASM-ready
$ flutter pub add flutter_redux_navigation
Source repository

What it does

It adds a middleware to a Redux store that listens for navigation actions and performs Flutter navigation. Developers dispatch NavigateToAction (push, replace, etc.) and can provide pre‑ and post‑navigation callbacks. It works with the standard Navigator via a global navigatorKey.

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

Use it when

  • You are already using Redux for state management and want navigation driven by actions.
  • You need pre/post navigation side‑effects like showing loaders or analytics.

Skip it when

  • You are not using Redux or prefer a different state‑management solution.
  • You need a full‑featured router with URL parsing, nested routes, or web‑specific features.

Strengths

  • Seamlessly integrates with Redux middleware pipeline
  • Supports pre‑ and post‑navigation hooks
  • Null‑safe and works on all Flutter platforms

Weaknesses

  • Tied exclusively to Redux, not usable with other state solutions
  • No built‑in route definitions or deep‑link handling
  • Small community and limited documentation

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add NavigationMiddleware to your Store middleware list and set NavigatorHolder.navigatorKey on MaterialApp.

final store = Store<AppState>(appReducer, initialState: AppState.initial(), middleware: [NavigationMiddleware<AppState>()]);

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return StoreProvider<AppState>(
      store: store,
      child: MaterialApp(
        navigatorKey: NavigatorHolder.navigatorKey,
        home: LoginPage(),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace flutter_redux_navigation.

  • bloc

    Provides a similar action‑based navigation pattern using Bloc listeners

  • flutter_bloc

    Integrates Bloc with Flutter widgets and can handle navigation via Bloc state changes

Works with

Packages commonly used together with flutter_redux_navigation: ones it builds on, ones built on it, and its own family.