PackageTrack
Sign in Get early access

provider

A wrapper around InheritedWidget to make them easier to use and more reusable.

6.1.5 1.1M downloads/mo #336 most downloaded on pub.dev rrousselGit/provider

What this package is like to depend on

Last release 1 years ago

19 Aug 2025

Release timing varies

gaps range from 5 weeks to 13 months

Most releases are documented

notes for 47 of 53 stable releases

1 version withdrawn

withdrawn after publishing

8 years old

70 releases · first in 2018

0 releases in the last 12 months

see the full history below

Release timeline

70 releases · Oct 2018 to Aug 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 70
  1. 6.1.5 29 Apr 2025
    Release notes

    Fix a bug where a bug reading another provider may obtain the wrong value.

    Open source →
  2. 6.1.5+1 19 Aug 2025
    Release notes

    provider : 6.1.5 -> 6.1.5+1

    Open source →
    Release notes

    Updated Discord link.

    Open source →
  3. 6.1.4 26 Mar 2025
    Release notes

    provider : 6.1.3 -> 6.1.4

    Open source →
    Release notes

    Fix MultiProvider not being inheritable anymore due to 6.1.3.

    Open source →
  4. 6.1.3 26 Mar 2025 withdrawn
    Release notes

    provider : 6.1.2 -> 6.1.3

    Open source →
    Release notes
    • Significantly increase the number of providers that MultiProvider can create at once without causing a StackOverflow.
    Open source →
  5. 6.1.2 28 Feb 2024
    Release notes

    provider : 6.1.1 -> 6.1.2

    Open source →
    Release notes
    • Fixed an issue with Selector not rebuilding when the builder listens to InheritedWidgets (thanks to @spkersten)
    Open source →
  6. 6.1.1 10 Nov 2023
    Release notes
    • Fix missing devtool assets
    Open source →
  7. 6.1.0 08 Nov 2023
    Release notes Open source →
    Release notes
    • The package now comes with a devtool extension enabled.
    Open source →
  8. 6.1.0-dev.1 24 Sep 2023 pre-release
    Release notes
    • Fix missing folder in devtool extension
    Open source →
  9. 6.1.0-dev.0 24 Sep 2023 pre-release
    Release notes
    • Moved the implementation of the devtool extension in the source of Provider (thanks to @kenzieschmoll)
    Open source →
  10. 6.0.5 14 Dec 2022
    Release notes
    • Fix broken links on pub.dev
    Open source →
  11. 6.0.4 11 Oct 2022
    Release notes

    Fix typos and broken links in the documentation

    Open source →
  12. 6.0.3 22 May 2022
    Release notes
    • fix late initialization error when using debugPrintRebuildDirtyWidgets
    • slightly reduced the binary size of release mode applications using provider
    • Fix typos in the error message of ProviderNotFoundException
    • improve performances for reading providers (thanks to @jiahaog)
    Open source →
  13. 6.0.2 29 Dec 2021
    Release notes

    Added error details for provider that threw during the creation (thanks to @jmewes)

    Open source →
  14. 6.0.1 24 Sep 2021
    Release notes

    Removed the assert that prevented from using ChangeNotifierProvider with notifiers that already had listeners.

    Open source →
  15. 6.0.0 19 Aug 2021
    Release notes
    • Breaking: It is no longer possible to define providers where their only difference is the nullability of the exposed value:

      MultiProvider(
        providers: [
          Provider<Model>(...),
          Provider<Model?>(...)
        ]
      )
      

      Before, when defining those providers, doing context.watch<Model> vs context.watch<Model?> would point to a different provider. Now, both will always point to the deepest provider (in this example Provider<Model?>).

      That fixes issues where a common developer mistake is to define a provider as Model? but try to read it as Model. Previously, that would give a ProviderNotFoundException. Now, this will correctly resolve the value.

      That also helps large codebase migrate to null-safety progressively, as they would temporarily contain both null-safe and unsound code. Previously, unsound code would be unable to read a provider defined as Provider<Model?>, as Model? is not a valid syntax. With this change, this is now feasible.

    • It is now possible to read a provider without throwing a ProviderNotFoundException if the provider is optional.

      To do so, when calling context.watch/context.read, make the generic type nullable. Such that instead of:

      context.watch<Model>()
      

      which will throw a ProviderNotFoundException if no matching providers are found, do:

      context.watch<Model?>()
      

      which will try to obtain a matching provider. But if none are found, null will be returned instead of throwing.

    Open source →
  16. 6.0.0-dev 12 Jul 2021 pre-release
    Release notes
    • Breaking: It is no longer possible to define providers where their only difference is the nullability of the exposed value:

      MultiProvider(
        providers: [
          Provider<Model>(...),
          Provider<Model?>(...)
        ]
      )
      

      Before, when defining those providers, doing context.watch<Model> vs context.watch<Model?> would point to a different provider. Now, both will always point to the deepest provider (in this example Provider<Model?>).

      That fixes issues where a common developer mistake is to define a provider as Model? but try to read it as Model. Previously, that would give a ProviderNotFoundException. Now, this will correctly resolve the value.

      That also helps large codebase migrate to null-safety progressively, as they would temporarily contain both null-safe and unsound code. Previously, unsound code would be unable to read a provider defined as Provider<Model?>, as Model? is not a valid syntax. With this change, this is now feasible.

    • It is now possible to read a provider without throwing a ProviderNotFoundException if the provider is optional.

      To do so, when calling context.watch/context.read, make the generic type nullable. Such that instead of:

      context.watch<Model>()
      

      which will throw a ProviderNotFoundException if no matching providers are found, do:

      context.watch<Model?>()
      

      which will try to obtain a matching provider. But if none are found, null will be returned instead of throwing.

    Open source →
  17. 5.0.0 04 Mar 2021
    Release notes
    • Stable, null-safe release.
    • pre-release of the mechanism for state-inspection using the Flutter devtool
    • Updated oudated doc in StreamProvider
    Open source →
  18. 5.0.0-nullsafety.5 20 Feb 2021 pre-release
    Release notes

    Fixed an issue where providers with an update parameter in sound null-safety mode could throw null exceptions.

    Open source →
  19. 5.0.0-nullsafety.4 17 Feb 2021 pre-release
    Release notes
    • Upgraded nested dependency to 1.0.0 and collection to 1.15.0
    Open source →
  20. 5.0.0-nullsafety.3 18 Jan 2021 pre-release
    Release notes
    • Improved the error message of ProviderNotFoundException to mention hot-reload. (#595)
    • Removed the asserts that prevented ChangeNotifiers in ChangeNotifierProvider() to have listeners (#596)
    • Removed the opinionated asserts in context.watch/context.read that prevented them to be used inside specific conditions (#585)
    Open source →
  21. 5.0.0-nullsafety.2 18 Dec 2020 pre-release
    Release notes
    • Improved the error message when an exception is thrown inside create of a provider`
    Open source →
  22. 5.0.0-nullsafety.1 10 Dec 2020 pre-release
    Release notes
    • Reintroduced ValueListenableProvider.value (the default constructor is still removed).
    Open source →
  23. 5.0.0-dev.0 02 Mar 2021 pre-release

    Nothing published for this version

  24. 4.3.3 18 Jan 2021
    Release notes
    • Improved the error message of ProviderNotFoundException to mention hot-reload. (#595)
    • Removed the asserts that prevented ChangeNotifiers in ChangeNotifierProvider() to have listeners (#596)
    • Removed the opinionated asserts in context.watch/context.read that prevented them to be used inside specific conditions (#585)
    Open source →
  25. 4.3.2 07 Aug 2020
    Release notes

    Fixed typo in the error message of ProviderNotFoundException

    Open source →
  26. 4.3.2+1 20 Aug 2020
    Release notes

    Documentation improvement about the builder parameter of Providers.

    Open source →
  27. 4.3.2+2 05 Sep 2020
    Release notes

    Improve pub score

    Open source →
  28. 4.3.2+3 07 Dec 2020
    Release notes

    Marked ValueListenableProvider as deprecated

    Open source →
  29. 4.3.2+4 14 Jan 2021
    Release notes

    ValueListenableProvider is no-longer deprecated. Only its default constructor is deprecated (the .value constructor is kept)

    Open source →
  30. 4.3.1 10 Jul 2020
    Release notes
    • Fixed a bug where hot-reload forced all lazy-loaded providers to be computed.
    Open source →
  31. 4.3.0 08 Jul 2020
    Release notes
    • Added ReassembleHandler interface, for objects to implement so that provider let them handle hot-reload.
    Open source →
  32. 4.2.0 07 Jul 2020
    Release notes
    • Added a builder parameter on MultiProvider (thanks to @joaomarcos96):

      MultiProvider(
        providers: [
          ChangeNotifierProvider(create: (ct) => Counter()),
        ],
        builder: (ctx, child) {
          final counter = ctx.watch<Counter>();
          return Text('${counter.count}');
        },
      );
      
    Open source →
  33. 4.1.3 05 Jun 2020
    Release notes
    • Improved the error message of ProviderNotFoundException with instructions that better fit what is usually the problem.

    • Added documentation on why context.read should not be called inside build, and what to do instead.

    • Improved the performances of context.select, by not calling the selectors when the provider changes if the widgets listening to the value are already needing build.

    • Fixes a bug where context.watch couldn't be called inside ListView/LayoutBuilder

    • Improve the error message when trying to use context.select inside ListView.builder

    • Improve the error message when calling context.read/watch/select/Provider.of with a context that is null.

    Open source →
  34. 4.1.3+1 05 Jul 2020
    Release notes
    • Small Readme changes
    Open source →
  35. 4.1.2 14 May 2020
    Release notes
    • Loosened the constraint on Flutter's version to be compatible with beta channel.
    Open source →
  36. 4.1.1 09 May 2020
    Release notes
    • Fixes an "aspect" leak with context.select, leading to memory leaks and unnecessary rebuilds
    • Fixes the builder parameter of providers not working (thanks to @passsy)
    Open source →
  37. 4.1.0 06 May 2020
    Release notes
    • Now requires:

      • Flutter >= 1.6.0
      • Dart >= 2.7.0
    • Added a select extension on BuildContext. It behaves similarly to Selector, but is a lot less verbose to write:

      With Selector:

      Widget build(BuildContext context) {
        return Selector<Person, String>(
          selector: (_, p) => p.name,
          builder: (_, name, __) {
            return Text(name);
          },
        ),
      }
      

      VS with the new select extension:

      Widget build(BuildContext context) {
        final name = context.select((Person p) => p.name);
        return Text(name);
      }
      
    • Added builder on the different providers. This parameter simplifies situations where we need a [BuildContext] that can access the new provider.

      As such, instead of:

      Provider(
        create: (_) => Something(),
        child: Builder(
          builder: (context) {
            final name = context.select((Something s) => s.name);
            return Text(name);
          },
        ),
      )
      

      we can write:

      Provider(
        create: (_) => Something(),
        builder: (context, child) {
          final name = context.select((Something s) => s.name);
          return Text(name);
        },
      )
      

      The behavior is the same. This is only a small syntax sugar.

    • Added a two extensions on [BuildContext], to slightly reduce the boilerplate:

      before after
      Provider.of<T>(context, listen: false) context.read<T>()
      Provider.of<T>(context) context.watch<T>
    • Added a Locator typedef and an extension on [BuildContext], to help with being able to read providers from a class that doesn't depend on Flutter.

    Open source →
  38. 4.1.0-dev 07 Feb 2020 pre-release

    Nothing published for this version

  39. 4.1.0-dev+1 06 Mar 2020 pre-release

    Nothing published for this version

  40. 4.1.0-dev+2 09 Mar 2020 pre-release

    Nothing published for this version

  41. 4.1.0-dev+3 11 Apr 2020 pre-release

    Nothing published for this version

  42. 4.0.5 11 Apr 2020
    Release notes
    • Improve error message when forgetting to pass a child when using a provider outside of MultiProvider (thanks to @felangel)
    Open source →
  43. 4.0.5+1 26 Apr 2020
    Release notes
    • Added Português translation of the readme file (thanks to @robsonsilv4)
    Open source →
  44. 4.0.4 12 Feb 2020
    Release notes
    • Update the ProviderNotFoundException to remove outdated solution. (thanks @augustinreille)
    Open source →
  45. 4.0.3 05 Feb 2020
    Release notes
    • improved error message when Provider.of is called without specifying listen: false outside of the widget tree.
    Open source →
  46. 4.0.2 18 Jan 2020
    Release notes
    • fix Provider.of returning the previous value instead of the new value if called inside didChangeDependencies.
    • fixed an issue where update was unnecessarily called.
    Open source →
  47. 4.0.1 28 Dec 2019
    Release notes
    • stable release of 4.0.0-hotfix+1
    • fix some typos
    Open source →
  48. 4.0.0 22 Dec 2019
    Release notes
    • Selector now deeply compares collections by default, and offers a shouldRebuild to customize the rebuild behavior.
    • renamed ProviderNotFoundError to ProviderNotFoundException. This allows calling Provider.of inside a try/catch without triggering a warning.
    • update provider to work with Flutter 1.12.1
    • The creation and listening of objects using providers is now performed lazily. This means that objects are created the first time the value is read instead of the first time the provider is mounted.
    • The listen argument of Provider.of is now automatically inferred. It is no longer necessary to pass listen: false when calling Provider.of outside of the widget tree. removed by 4.0.0-hotfix. See https://github.com/rrousselGit/provider/issues/305
    • renamed initialBuilder & builder of *ProxyProvider to create & update
    • renamed builder of *Provider to create
    • added a *ProxyProvider0 variant
    Open source →
  49. 4.0.0-hotfix.1 25 Dec 2019 pre-release
    Release notes
    • removed the inference of the listen flag of Provider.of in favor of an exception in debug mode if listen is true when it shouldn't.

      This is because it caused a critical performance issue. See https://github.com/rrousselGit/provider/issues/305

    Open source →
  50. 4.0.0-dev 26 Nov 2019 pre-release

    Nothing published for this version

  51. 3.2.0 27 Nov 2019
    Release notes
    • Deprecated "builder" of providers in favor to "create"
    • Deprecated "initialBuilder"/"builder" of proxy providers in favor of respectively "create" and "update"
    Open source →
  52. 3.1.0 20 Aug 2019
    Release notes
    • Added Selector, similar to Consumer but can filter unneeded updates

    • improved the overall documentation

    • fixed a bug where ChangeNotifierProvider.value didn't update dependents when the ChangeNotifier instance changed.

    • Consumer can now be used inside MultiProvider

      MultiProvider(
        providers: [
          Provider(builder: (_) => Foo()),
          Consumer<Foo>(
            builder: (context, foo, child) =>
              Provider.value(value: foo.bar, child: child),
          )
        ],
      );
      
    Open source →
  53. 3.1.0+1 17 Oct 2019

    Nothing published for this version

  54. 3.0.0 07 Jun 2019
    Release notes

    breaking (see the readme for migration steps)

    • Provider now throws if used with a Listenable/Stream. This can be disabled by setting Provider.debugCheckInvalidValueType to null.
    • The default constructor of StreamProvider has now builds a Stream instead of StreamController. The previous behavior has been moved to StreamProvider.controller.
    • All XXProvider.value constructors now use value as parameter name.
    • Added FutureProvider, which takes a future and updates dependents when the future completes.
    • Providers can no longer be instantiated using const constructors.

    non-breaking

    • Added ProxyProvider, ListenableProxyProvider, and ChangeNotifierProxyProvider. These providers allows building values that depends on other providers, without loosing reactivity or manually handling the state.
    • Added DelegateWidget and a few related classes to help building custom providers.
    • Exposed the internal generic InheritedWidget to help building custom providers.
    Open source →
  55. 3.0.0+1 11 Jun 2019

    Nothing published for this version

  56. 2.0.1 12 May 2019
    Release notes
    • fix a bug where ListenableProvider.value/ChangeNotifierProvider.value /StreamProvider.value/ValueListenableProvider.value subscribed/unsubscribed to their respective object too often
    • fix a bug where ListenableProvider.value/ChangeNotifierProvider.value may rebuild too often or skip some.
    Open source →
  57. 2.0.1+1 25 May 2019

    Nothing published for this version

  58. 2.0.0 03 May 2019
    Release notes
    • Consumer now takes an optional child argument for optimization purposes.
    • merged Provider and StatefulProvider
    • added a "builder" constructor to ValueListenableProvider
    • normalized providers constructors such that the default constructor is a "builder", and offer a value named constructor.
    Open source →
  59. 2.0.0+1 03 May 2019

    Nothing published for this version

  60. 2.0.0-dev 10 Apr 2019 pre-release

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive