This is part of the "Flutter Fundamentals" learning path. View Path

Managing State in Flutter

Sep 22 2022 · Video Course (1 hr, 19 mins) · Intermediate

State management is a key aspect of working with Flutter. There are lots of different solutions with lots of different approaches. In this course, you’ll learn about the base tools provided by Flutter and then learn how to use the Google recommended state management solution, Provider.

Version

  • Dart 2.17, Flutter 3.0, Android Studio Chipmunk

Understand State Management

Introduction

3:53 Free

Provides an overview of the state management, why it is important to know, and the various topics that are covered in this course.

1

This episode provides a comprehensive overview of state managment in Flutter. You’ll learn why it is important to know as well as some of the various solutions out there.

2

Learn about the sample project in this episode. You’ll see how it is built and how it is being used.

3

setState() is the primary method used to update set, but you’ll quickly learn that while setState will update the widget tree, it may do it in away that you don’t quite expect.

4

In this episode, you’ll be introduced to the ValueNotifier. You’ll learn how it works and how to use it to manage your state.

5

Take the ValueNotifier to the next level by extending the ValueNotifier. After which, aquire automatic updates by way of the ValueNotifierListenable widget.

6

Learn about the Inherited Widget - Flutter’s main component for managing state in an app. While using the Inherited Widget is relatively straight forward, there are some things to consider.

7

While the Inherited Widget is able to manage state it requires some work to manage mutable state. Learn how to combine a Stateful Widget with an Inherited Widget to create mutable state.

8

Use Provider

Get an overview of the Provider package and how you can use it to manage the state of your app.

9

Learn how to use the very first Provider aptly called Provider. You’ll learn how to use this to fetch model data as well as some limitations.

10

While the Provider was fine for receiving model data, it didn’t react to state changes. In this episode, you’ll see how to leverage a Change Provider to receive state updates.

11

Provider includes a bunch of extension methods that make it easier to observe state changes as well as how to view individual properties. Learn how to use these context methods.

12

In this episode, learn how to leverage the consumer which unwraps your objects from a Provider, saving you some code.

13

Learn how to take multiple different providers and combine them into a single multiprovider that makes your code easier to read.

14

Learn about the other Provider features that were not covered in this course as well as some additional thoughts about using third party dependencies for your state management.

15

Next course in this Learning Path

Version history

Flutter 3.0, Dart 2.17, Android Studio Chipmunk (Selected)

Sep 22 2022

Flutter 1.9, Dart 2.5, VS Code 1.39

Oct 17 2019

Who is this for?

This course is for Flutter developers who are looking to get an overview of the state management solutions included with Flutter as well as Provider, the Google recommended third party solution.

Covered concepts

  • Inherited widget
  • Set State
  • Value Notifier
  • Provider
  • Change Notifier
  • Multiple Providers
  • Provide Extension Methods

Contributors

Comments