Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Update dependency provider to v6 #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 19, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
provider dependencies major 5.0.0 -> 6.0.2

Release Notes

rrousselGit/provider

v6.0.2

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

v6.0.1

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

v6.0.0

Compare Source

  • 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.


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/provider-6.x branch 2 times, most recently from 8f79e6f to 91b640f Compare August 24, 2021 05:24
@renovate renovate bot force-pushed the renovate/provider-6.x branch from 91b640f to da9285f Compare September 24, 2021 11:59
@renovate renovate bot force-pushed the renovate/provider-6.x branch from da9285f to e9fdf0e Compare March 7, 2022 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant