The Provider Library Fundamentals
Learn what a provider library is and how you can use the "Provider.of<T>" method.
What is the Provider
package
What is the Provider
in Flutter?
The Provider
is a Flutter package. It’s a wrapper around the InheritedWidget
.
Before we proceed, we must add the dependency on the provider
to the pubspec.yaml
file.
It looks like this:
Press + to interact
dependencies:flutter:sdk: flutterprovider:
Now you are set to use the provider
to manage a state in your app.
What is a state? The state is something that exists in memory. When the app is running, in most cases, we will try to manage the state. The Provider
helps you to do that.
The state itself is critical, while efficiently ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy