1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00
Filip Hracek 7bae186046 Finish the migration from scoped_model to provider
After this change, we’re managing Counter’s lifecycle with ChangeNotifierProvider.

This removes the periodic Timer. Not only does that simplify the example and makes it closer to the original, it also prevents a leaking timer (though, in this case, it’s not an issue, since the timer is needed for the whole duration of the app). I experimented with a more robust approach (having or injecting a Timer/StreamController into the Counter, and disposing of it there) but that seemed overly complex for such a simple example. This whole problem will get significantly easier with https://github.com/rrousselGit/provider/issues/46, at which point I could reintroduce this. I will also think about a more complex Provider example, something like the venerable `bloc_complex`, with infinite-scrolling pagination and all that.
2019-05-20 16:54:25 -07:00
2019-05-01 17:56:55 -07:00
2019-05-20 10:58:07 -07:00
2019-05-08 09:19:45 -07:00
2018-07-31 15:04:42 -07:00
2018-06-08 14:36:44 -07:00
2018-06-08 14:36:44 -07:00
2018-12-06 19:05:40 +00:00

Flutter samples

Build Status

A collection of open source samples that illustrate best practices for Flutter.

Index

For a curated list of samples in this repo and elsewhere, see the index.

Interested in contributing?

See the contributor's guide!

Questions or issues?

If you have a general question about one of these samples or how to adapt its techniques for one of your own apps, try one of these resources:

If you run into a bug in one of the samples, please file an issue in the main Flutter repo.

Description
No description provided
Readme 1 GiB
Languages
Dart 71%
C++ 11.4%
CMake 8.7%
Kotlin 2.2%
Swift 1.9%
Other 4.8%