Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter State Management

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Flutter State Management

Avatar for Danvick Miller

Danvick Miller

May 07, 2021
Tweet

More Decks by Danvick Miller

Other Decks in Programming

Transcript

  1. Definition – State management • Keeping track and making use

    of values and their changes within the app
  2. Types of State Ephemeral State • Contained in a single

    Widget. Aka local state or UI state. • Examples include: State of an animation, form input, form validation • Tighly coupled with UI widgets App State • State shared across multiple parts of the app • Examples: Authentication state, user preferences, shopping cart • Loosely coupled with the UI widgets
  3. How to manage state – Ephemeral State Ephemeral State •

    Using StatefulWidgets – via setState() App State • Provider • BLoC • MobX • Riverpod • Redux • And multiple others
  4. Importance of effective state management • Keep UI separate from

    business logic • Add features without breaking app • App remains testable