mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
6 years ago
|
# Provider Counter
|
||
6 years ago
|
|
||
6 years ago
|
The starter Flutter application, but using Provider to manage state.
|
||
6 years ago
|
|
||
|
This app is a direct counterpart to the
|
||
|
[simple counter application](https://flutter.io/docs/development/ui/widgets-intro#changing-widgets-in-response-to-input)
|
||
|
that you get when you create a new Flutter project. That one uses a `StatefulWidget` to manage
|
||
|
application state. The version in this repository uses a simple app state management approach,
|
||
6 years ago
|
`Provider`.
|
||
6 years ago
|
|
||
|
It shows how you might deal with state that is modified from outside the app (for example,
|
||
|
state synchronized over network) and which needs to be accessed and changed
|
||
|
from different parts of your app.
|
||
|
|
||
|
## Getting Started
|
||
|
|
||
|
The only important part of the app is the `lib/main.dart` file. It has comments that will walk you
|
||
|
through it.
|
||
|
|
||
6 years ago
|
For more information on the `provider` package (where `Provider` comes from), please
|
||
|
[see the package documentation](https://pub.dartlang.org/packages/provider).
|
||
6 years ago
|
|
||
|
For more information on state management in Flutter, and a list of other approaches,
|
||
|
head over to the
|
||
6 years ago
|
[State management page at flutter.dev](https://flutter.dev/docs/development/data-and-backend/state-mgmt).
|