Technical & DevelopmentIntermediate
flutter-implementing-navigation-and-routing
Handle routing, navigation, and deep linking
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/flutter/skills --skill flutter-implementing-navigation-and-routingnpx skills add https://github.com/flutter/skills --skill flutter-implementing-navigation-and-routingOr paste this URL into your assistant to install:
Overview
What This Skill Does
Handle routing, navigation, and deep linking
Application
When to use this Skill
- Integrating flutter implementing navigation and routing into your development workflow.
- Following best practices for handle routing, navigation, and deep linking.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
Documentation
Show Skills.md file
Implementing Navigation and Routing in Flutter
Contents
- Core Concepts
- Implementing Imperative Navigation
- Implementing Declarative Navigation
- Implementing Nested Navigation
- Workflows
- Examples
Core Concepts
- Routes: In Flutter, screens and pages are referred to as routes. A route is simply a widget. This is equivalent to an
Activityin Android or aViewControllerin iOS. - Navigator vs. Router:
- Use
Navigator(Imperative) for small applications without complex deep linking requirements. It manages a stack ofRouteobjects. - Use
Router(Declarative) for applications with advanced navigation, web URL synchronization, and specific deep linking requirements.
- Use
- Deep Linking: Allows an app to open directly to a specific location based on a URL. Supported on iOS, Android, and Web. Web requires no additional setup.
- Named Routes: Avoid using named routes (
MaterialApp.routesandNavigator.pushNamed) for most applications. They have rigid deep linking behavior and do not support the browser forward button. Use a routing package likego_routerinstead.
Implementing Imperative Navigation
Use the Navigator widget to push and pop routes using platform-specific transition animations (MaterialPageRoute or CupertinoPageRoute).
Pushing and Popping
- Navigate to a new route using
Navigator.push(context, route).
Lines 1 - 25 of 197
Recommendations
Explore other random skills
CreativeIntermediate
gsap-core
Core API with gsap.to(), from(), fromTo(), easing, duration, stagger, and defaults
CreativeIntermediate
gsap-timeline
Timelines with sequencing, position parameter, labels, nesting, and playback control
CreativeIntermediate
gsap-scrolltrigger
ScrollTrigger for scroll-linked animations, pinning, scrub, and refresh handling