Flutter logo
  • Docs
    • Get started
      • 1. Install
      • 2. Set up an editor
      • 3. Test drive
      • 4. Write your first app
      • 5. Learn more
      • From another platform?
        • Flutter for Android devs
        • Flutter for iOS devs
        • Flutter for React Native devs
        • Flutter for web devs
        • Flutter for Xamarin.Forms devs
        • Introduction to declarative UI
      • Dart language overview
      • Building a web app
    • Samples & tutorials
      • Flutter Gallery [running app]
      • Flutter Gallery [repo]
      • Sample apps on GitHub
      • Cookbook
      • Codelabs
      • Tutorials
    • Development
      • User interface
        • Introduction to widgets
        • Building layouts
          • Layouts in Flutter
          • Tutorial
          • Creating adaptive and responsive apps
          • Building adaptive apps
          • Understanding constraints
          • Box constraints
        • Adding interactivity
        • Assets and images
        • Navigation & routing
          • Navigation in Flutter
          • Deep linking
          • URL strategies
        • Animations
          • Introduction
          • Overview
          • Tutorial
          • Implicit animations
          • Hero animations
          • Staggered animations
        • Advanced UI
          • Actions & shortcuts [NEW]
          • Keyboard focus [NEW]
          • Gestures
          • Slivers
          • Splash screens
        • Widget catalog
      • Data & backend
        • State management
          • Introduction
          • Think declaratively
          • Ephemeral vs app state
          • Simple app state management
          • Options
        • Networking & http
        • JSON and serialization
        • Firebase
      • Accessibility & internationalization
        • Accessibility
        • Internationalization
      • Platform integration
        • Supported platforms
        • Adding iOS App Clip support
        • Apple Watch support
        • C interop
        • Hosting native Android and iOS views
        • Web FAQ
        • Writing platform-specific code
      • Packages & plugins
        • Using packages
        • Developing packages & plugins
        • Flutter Favorites program
        • Background processes
        • Android plugin upgrade
        • Package site
      • Add Flutter to existing app
        • Introduction
        • Adding to an Android app
          • Project setup
          • Add a single Flutter screen
          • Add a Flutter Fragment
          • Add a Flutter View
          • Plugin setup
        • Adding to an iOS app
          • Project setup
          • Add a single Flutter screen
        • Debugging & hot reload
        • Loading sequence and performance
        • Multiple Flutter instances
      • Tools & features
        • Android Studio & IntelliJ
        • Visual Studio Code
        • DevTools
          • Overview
          • Install from Android Studio & IntelliJ
          • Install from VS Code
          • Install from command line
          • Flutter inspector
          • Performance view
          • CPU Profiler view
          • Memory view
          • Network view
          • Debugger
          • Logging view
          • App size tool
        • Flutter SDK
          • Overview
          • Upgrading
          • Releases
          • Breaking changes
          • Release notes
        • Flutter and the pubspec file
        • Hot reload
        • Flutter Fix
        • Code formatting
        • Web renderers
      • Migration notes
        • AndroidX migration
        • Android plugin upgrade
        • Developing for iOS 14
        • Xcode migration
    • Testing & debugging
      • Debugging tools
      • Debugging apps programmatically
      • Using an OEM debugger
      • Flutter's build modes
      • Common Flutter errors
      • Handling errors
      • Testing
      • Integration testing
    • Performance & optimization
      • Overview
      • App size
      • Deferred components [NEW]
      • Rendering performance
        • Overview
        • Performance best practices
        • Performance profiling
        • Reduce shader compilation jank
      • Performance metrics
      • Performance FAQ
      • Appendix
    • Deployment
      • Obfuscating Dart code
      • Creating flavors for Flutter
      • 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 web app
      • Continuous deployment
    • Resources
      • Dart resources
      • Compatibility policy
      • Architectural overview
      • Inside Flutter
      • Google Fonts package
      • Platform adaptations
      • Videos and online courses
      • Books
      • FAQ
      • Design Documents
      • Creating useful bug reports
      • Contributing to Flutter
      • Official brand assets
    • Reference
      • Who is Dash?
      • Widget index
      • API reference
      • flutter CLI reference
      • Package site
  • Showcase
  • Community
Get started
Free access to best-selling book Flutter Apprentice, for a limited time only! Learn more...
  • Get started
    • 1. Install
    • 2. Set up an editor
    • 3. Test drive
    • 4. Write your first app
    • 5. Learn more
    • From another platform?
      • Flutter for Android devs
      • Flutter for iOS devs
      • Flutter for React Native devs
      • Flutter for web devs
      • Flutter for Xamarin.Forms devs
      • Introduction to declarative UI
    • Dart language overview
    • Building a web app
  • Samples & tutorials
    • Flutter Gallery [running app]
    • Flutter Gallery [repo]
    • Sample apps on GitHub
    • Cookbook
    • Codelabs
    • Tutorials
  • Development
    • User interface
      • Introduction to widgets
      • Building layouts
        • Layouts in Flutter
        • Tutorial
        • Creating adaptive and responsive apps
        • Building adaptive apps
        • Understanding constraints
        • Box constraints
      • Adding interactivity
      • Assets and images
      • Navigation & routing
        • Navigation in Flutter
        • Deep linking
        • URL strategies
      • Animations
        • Introduction
        • Overview
        • Tutorial
        • Implicit animations
        • Hero animations
        • Staggered animations
      • Advanced UI
        • Actions & shortcuts [NEW]
        • Keyboard focus [NEW]
        • Gestures
        • Slivers
        • Splash screens
      • Widget catalog
    • Data & backend
      • State management
        • Introduction
        • Think declaratively
        • Ephemeral vs app state
        • Simple app state management
        • Options
      • Networking & http
      • JSON and serialization
      • Firebase
    • Accessibility & internationalization
      • Accessibility
      • Internationalization
    • Platform integration
      • Supported platforms
      • Adding iOS App Clip support
      • Apple Watch support
      • C interop
      • Hosting native Android and iOS views
      • Web FAQ
      • Writing platform-specific code
    • Packages & plugins
      • Using packages
      • Developing packages & plugins
      • Flutter Favorites program
      • Background processes
      • Android plugin upgrade
      • Package site
    • Add Flutter to existing app
      • Introduction
      • Adding to an Android app
        • Project setup
        • Add a single Flutter screen
        • Add a Flutter Fragment
        • Add a Flutter View
        • Plugin setup
      • Adding to an iOS app
        • Project setup
        • Add a single Flutter screen
      • Debugging & hot reload
      • Loading sequence and performance
      • Multiple Flutter instances
    • Tools & features
      • Android Studio & IntelliJ
      • Visual Studio Code
      • DevTools
        • Overview
        • Install from Android Studio & IntelliJ
        • Install from VS Code
        • Install from command line
        • Flutter inspector
        • Performance view
        • CPU Profiler view
        • Memory view
        • Network view
        • Debugger
        • Logging view
        • App size tool
      • Flutter SDK
        • Overview
        • Upgrading
        • Releases
        • Breaking changes
        • Release notes
      • Flutter and the pubspec file
      • Hot reload
      • Flutter Fix
      • Code formatting
      • Web renderers
    • Migration notes
      • AndroidX migration
      • Android plugin upgrade
      • Developing for iOS 14
      • Xcode migration
  • Testing & debugging
    • Debugging tools
    • Debugging apps programmatically
    • Using an OEM debugger
    • Flutter's build modes
    • Common Flutter errors
    • Handling errors
    • Testing
    • Integration testing
  • Performance & optimization
    • Overview
    • App size
    • Deferred components [NEW]
    • Rendering performance
      • Overview
      • Performance best practices
      • Performance profiling
      • Reduce shader compilation jank
    • Performance metrics
    • Performance FAQ
    • Appendix
  • Deployment
    • Obfuscating Dart code
    • Creating flavors for Flutter
    • 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 web app
    • Continuous deployment
  • Resources
    • Dart resources
    • Compatibility policy
    • Architectural overview
    • Inside Flutter
    • Google Fonts package
    • Platform adaptations
    • Videos and online courses
    • Books
    • FAQ
    • Design Documents
    • Creating useful bug reports
    • Contributing to Flutter
    • Official brand assets
  • Reference
    • Who is Dash?
    • Widget index
    • API reference
    • flutter CLI reference
    • Package site

State management

  1. Docs
  2. Development
  3. Data & backend
  4. State management

Topics:

  • Introduction
  • Think declaratively
  • Ephemeral vs app state
  • Simple app state management
  • Options
Flutter Logo
  • flutter-dev@
  • terms
  • brand usage
  • security
  • privacy
  • español
  • 社区中文资源
  • 한국어
  • We stand in solidarity with the Black community. Black Lives Matter.

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the BSD License.