The useful question is not which package ranks first. It is which state exists, who owns it, how it changes and how those changes can be verified.
Start with the problem
A local expanded panel may only need setState. Several widgets reading the same model need a clear shared owner. An asynchronous workflow may need cancellation, retries, caching and explicit failures. List those requirements before choosing a package.
| Approach | Useful fit | Main design question |
|---|---|---|
| setState | Screen-local interaction | Which widget owns the value? |
| ValueNotifier | One observable value | Who owns and disposes the notifier? |
| Provider | Scoped dependency/model access | Is the model lifecycle clear? |
| Riverpod | Provider-based state and dependencies | What is each provider’s lifetime? |
| Bloc/Cubit | Explicit feature state transitions | Which events or methods produce states? |
Compare the same feature
Use a task list with loading, adding and failure behavior for a meaningful comparison. Different counter demos can hide differences in asynchronous work and lifecycle.
Avoid two sources of truth
Introducing a package should not leave a separate widget-local copy of the same business state. Decide which object is authoritative and derive the visible values from it.
Keep a migration boundary
Repositories and domain operations should not depend unnecessarily on a specific widget lookup API. That separation makes it easier to change presentation state handling without rewriting the data layer.
Use one requirement sheet for every candidate
Write down the same feature for each comparison: who owns the data, which screens observe it, what triggers changes and what happens after cancellation or failure. Comparing unrelated demos rewards whichever example omitted the difficult parts.
Then evaluate how easily a new team member can trace an action to an update and test it with a fake dependency. Package popularity is useful ecosystem context, but it does not settle whether an application-wide model or a screen-local value is appropriate.
Use local state as the smallest baseline and repository boundaries to keep data access independent. Choose the smallest approach that expresses the current contract without duplicating sources of truth.
Practice and verification
Write an ownership diagram for a small notes app: draft text, saved notes, authentication and search results. Choose an approach for each scope and explain the trade-offs. There is no requirement to use one tool for every value.