A UI is excellent but useless if it doesn't reflect changes immediately. In this chapter, we'll learn how to update our app in real time when the data changes on the server.
For this, we will use Providers, which allow us to listen to changes in the data and update the UI accordingly.
Here's what we'll do:
- Install Flutter package
provider
- Create our first CategoryProvider
- Refactor our CategoryList to use the CategoryProvider
- Refactor our Main Screen to support Providers
Install Flutter Package
To install our package...