The Consumer Widget: Introduction

Learn about the consumer widget from the provider library.

The Consumer widget

How do we use the Consumer widget from the Provider library to manage Flutter states?

Well, let’s check that.

We have already learned what a Flutter state is, before. Although we’ve not yet explored state management in Flutter alone, we have previously touched upon Providers. In that lesson, we learned how to manage a state in Flutter.

But how can we use the Provider consumer widget to manage the state? Let’s take a look.

Consumer() vs. Provider.of()

Is the Consumer<T> method better than the Provider.of()<T> method to manage the state?

The author of the provider package, Rémi Rousselet ...

Competition

Get hands-on with 1400+ tech skills courses.