docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. Learn more.

Skip to main content
  • Flutter logo Flutter
  • Flutter logo Flutter Docs
  • Flutter logo Flutter API
  • Dart logo Dart
  • Dart logo DartPad
  • Dart logo pub.dev
  • Homepage
  • Community
  • Packages
  • API reference
search
Get started
  • Get started
  • Set up Flutter
    • Introduction
    • Write your first app
      • Introduction
      • Intro to Dart
      • Widgets
      • Layout
      • State management
      • Handling user input
      • Networking and data
      • Local data and caching
      • Flutter for Android devs
      • Flutter for Jetpack Compose devs
      • Flutter for SwiftUI devs
      • Flutter for UIKit devs
      • Flutter for React Native devs
      • Flutter for web devs
      • Flutter for Xamarin.Forms devs
      • Introduction to declarative UI
      • Flutter versus Swift concurrency
    • Samples & tutorials
    • Upgrade
    • SDK archive
    • Release notes
    • Breaking changes
    • Compatibility policy
    • What's new in the docs
        • Overview
        • User experience
        • Feature integration
        • Custom LLM providers
        • Chat client sample
      • Vertex AI in Firebaseopen_in_new
      • Overview
      • Discover Firebase for Flutteropen_in_new
      • Get to know Firebase for Flutteropen_in_new
      • Add a user authentication flow to a Flutter app using FirebaseUIopen_in_new
      • Get to know Firebase for webopen_in_new
      • Overview
      • Add achievements and leaderboards
      • Build leaderboards with Firestoreopen_in_new
      • Add advertising
      • Add multiplayer support
      • Add in-app purchasesopen_in_new
      • Add user authenticationopen_in_new
      • Debug using Crashlyticsopen_in_new
      • Intro to Flame with Flutteropen_in_new
        • Ads overview
        • Add advertising
        • Add AdMob ads to your Flutter appopen_in_new
        • Add an AdMob banner and native inline adsopen_in_new
        • Integrate multimedia ads (video)open_in_new
        • Google AdMob mediationopen_in_new
        • Interactive Media Ads SDKopen_in_new
        • Payments overview
        • Google pay packageopen_in_new
      • Add in-app purchasesopen_in_new
      • Add Google maps to a Flutter appopen_in_new
      • Google Maps packageopen_in_new
    • Build a news app
  • User interface
  • Introduction
  • Widget catalog
    • Introduction
    • Build a layout
      • Create and use lists
      • Create a horizontal list
      • Create a grid view
      • Create lists with different types of items
      • Create lists with spaced items
      • Work with long lists
      • Overview
      • Use slivers to achieve fancy scrolling
      • Place a floating app bar above a list
      • Create a scrolling parallax effect
    • Overview
    • General approach
    • SafeArea & MediaQuery
    • Large screens & foldables
    • User input & accessibility
    • Capabilities & policies
    • Automatic platform adaptations
    • Best practices
    • Additional resources
    • Share styles with themes
    • Material design
    • Migrate to Material 3
      • Fonts & typography
      • Use a custom font
      • Export fonts from a package
      • Google Fonts packageopen_in_new
      • Use custom fragment shaders
    • Add interactivity to your app
      • Introduction
      • Handle taps
      • Drag an object outside an app
      • Drag a UI element within an app
      • Add Material touch ripples
      • Implement swipe to dismiss
      • Create and style a text field
      • Retrieve the value of a text field
      • Handle changes to a text field
      • Manage focus in text fields
      • Build a form with validation
    • Display a snackbar
    • Implement actions & shortcuts
    • Manage keyboard focus
    • Add assets and images
    • Display images from the internet
    • Fade in images with a placeholder
    • Play and pause a video
    • Transform assets at build time
    • Overview
    • Add tabs to your app
    • Navigate to a new screen and back
    • Send data to a new screen
    • Return data from a screen
    • Add a drawer to a screen
    • Set up deep linking
    • Set up app links for Android
    • Set up universal links for iOS
    • Configure web URL strategies
    • Introduction
    • Tutorial
    • Implicit animations
    • Animate the properties of a container
    • Fade a widget in and out
    • Hero animations
    • Animate a page route transition
    • Animate using a physics simulation
    • Staggered animations
    • Create a staggered menu animation
    • API overview
    • Accessibility
    • Internationalization
  • Beyond UI
      • Introduction
      • Think declaratively
      • Ephemeral vs app state
      • Simple app state management
      • Options
      • Overview
      • Fetch data from the internet
      • Make authenticated requests
      • Send data to the internet
      • Update data over the internet
      • Delete data on the internet
      • Communicate with WebSockets
      • JSON serialization
      • Parse JSON in the background
      • Store key-value data on disk
      • Read and write files
      • Persist data with SQLite
      • Overview
      • Add Firebase to your Flutter appopen_in_new
    • Google APIs
    • Introduction
    • Architecture concepts
    • Guide to app architecture
      • Overview
      • UI layer
      • Data layer
      • Dependency injection
      • Testing each layer
    • Recommendations
    • Design patterns
    • Supported platforms
    • Build desktop apps with Flutter
    • Write platform-specific code
      • Set up Android development
      • Add a splash screen
      • Add predictive back
      • Bind to native code
      • Host a native Android view
      • Calling JetPack APIs
      • Launch a Jetpack Compose activity
      • Restore state on Android
      • Target ChromeOS with Android
      • Add iOS as build target
      • Flutter on latest iOS
      • Leverage Apple's system libraries
      • Add a launch screen
      • Add iOS App Clip support
      • Add iOS app extensions
      • Bind to native code
      • Host a native iOS view
      • Enable debugging on iOS
      • Restore state on iOS
      • Add Linux as build target
      • Build a Linux app
      • Add macOS as build target
      • Build a macOS app
      • Bind to native code
      • Host a native macOS view
      • Web support in Flutter
      • Set up web development
      • Build a web app
      • Compile to WebAssembly
      • Customize app initialization
      • Add Flutter to any web app
      • Web content in Flutter
      • Web renderers
      • Display images on the web
      • Web FAQ
      • Add Windows as build target
      • Build a Windows app
    • Use packages & plugins
    • Develop packages & plugins
      • For app developers
      • For plugin authors
    • Flutter Favorites
    • Package repositoryopen_in_new
    • Testing
    • Overview
      • Introduction
      • Mock dependencies
      • Introduction
      • Find widgets
      • Simulate scrolling
      • Simulate user interaction
      • Introduction
      • Write and run an integration test
      • Profile an integration test
    • Test a plugin
    • Handle plugin code in tests
    • Debugging
    • Debugging tools
    • Debug your app programmatically
    • Use a native language debugger
    • Common Flutter errors
    • Handle errors
    • Report errors to a service
    • Overview
    • Impeller
    • Performance best practices
    • App size
    • Deferred components
    • Rendering performance
    • Performance profiling
    • Performance profiling for web
    • Performance metrics
    • Concurrency and isolates
    • Performance FAQ
    • Appendix
    • Obfuscate Dart code
    • Create app flavors for Android
    • Create app flavors for iOS and macOS
    • Build and release an Android app
    • Build and release an iOS app
    • Build and release a macOS app
    • Build and release a Linux app
    • Build and release a Windows app
    • Build and release a web app
    • Set up continuous deployment
    • Introduction
      • Set up Android project
      • Add a single Flutter screen
      • Add a Flutter Fragment
      • Add a Flutter View
      • Use a Flutter plugin
      • Set up iOS project
      • Add a single Flutter screen
    • Add to a web app
    • Debug embedded Flutter module
    • Add multiple Flutter instances
    • Loading sequence and performance
    • Android Studio & IntelliJ
    • Visual Studio Code
      • Overview
      • Run from Android Studio & IntelliJ
      • Run from VS Code
      • Run from command line
      • Flutter inspector
      • Legacy Flutter inspector
      • Performance view
      • CPU Profiler view
      • Memory view
      • Debug console view
      • Network view
      • Debugger
      • Logging view
      • App size tool
      • DevTools extensions
      • Validate deep links
      • Release notes
    • SDK overview
    • Flutter's pubspec options
    • Automated fixes
    • Code formatting
    • Architectural overview
    • Inside Flutter
    • Understanding constraints
    • Flutter's build modes
    • Hot reload
    • FAQ
    • Books
    • Videos
    • Courses
    • Learn Dart
    • Get support
      • Contribute to Flutter
      • Create useful bug reports
      • Discover proposed features
      • Who is Dash?
      • Widget index
      • Create a new app
      • flutter CLI
      • API docsopen_in_new

Flutter is back at Google I/O on May 20-21! Explore the agenda now

Navigation

  1. Cookbook chevron_right
  2. Navigation
  • Set up universal links for iOS
  • Set up app links for Android
  • Animate a widget across screens
  • Navigate with named routes
  • Pass arguments to a named route
  • Navigate to a new screen and back
  • Send data to a new screen
  • Return data from a screen
Was this page's content helpful?
Thank you for your feedback!
feedback Provide details
Thank you for your feedback! Please let us know what we can do to improve.
bug_report Provide details

Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2024-04-04. View source or report an issue.

Flutter logo
Except as otherwise noted, this site is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the 3-Clause BSD License.
  • Terms
  • Brand
  • Privacy
  • Security