asyncredux-navigation

Dispatch NavigateAction push, pop, and replace actions to control the Navigator.

238|39|Updated Aug 4, 2019
One-click install
npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-navigation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-navigation
Source: https://github.com/marcglasberg/async_redux/tree/main/.claude/skills/asyncredux-navigation
Command: npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-navigation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill decouples navigation logic from UI by allowing navigation to be driven through Redux-like actions using NavigateAction, enabling easier testing and isolation of navigation logic.

Core Features & Use Cases

  • Navigate by dispatching NavigateAction for push, pop, and replace.
  • Test navigation flows in isolation without coupling to widgets.
  • Setup a global navigator key and integrate with MaterialApp to drive routes from actions.

Quick Start

Use the asyncredux-navigation skill to dispatch NavigateAction.pushNamed('/details') after setting up the navigator key.

Frequently Asked Questions about asyncredux-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I unit test navigation flows in Flutter without coupling to widgets?

Action-driven navigation in Flutter dispatches Redux-like NavigateAction objects to control the Navigator. This approach decouples routing logic from UI widgets, enabling push, pop, and replace operations to be driven entirely by store actions.

Can I use NavigateAction with Navigator 1 for push and replace routes?

Yes, NavigateAction supports Navigator 1 for push, pop, and replace commands. You must configure a global NavigatorKey and integrate it with MaterialApp to dispatch routing actions effectively from your store.

What is the best way to decouple Flutter navigation logic from the UI layer?

Using an action-driven approach with NavigateAction is the best way to decouple Flutter navigation logic. By dispatching routing commands through a Redux-like store, you isolate navigation from widgets, making the logic highly testable and maintainable.

Do I need a global NavigatorKey to set up action-driven routing in Flutter?

Yes, a global NavigatorKey is required to set up action-driven routing in Flutter. You must integrate this key with your MaterialApp so that NavigateAction can successfully communicate with the Navigator to execute route changes.

Why should I dispatch navigation actions instead of calling Navigator directly in Flutter widgets?

You should dispatch navigation actions to achieve testable apps by isolating routing logic from widgets. Calling Navigator directly tightly couples navigation to the UI, whereas dispatching NavigateAction allows flows to be unit tested independently.