This repository was archived by the owner on Mar 8, 2022. It is now read-only.
Open
Conversation
8f79e6f to
91b640f
Compare
91b640f to
da9285f
Compare
da9285f to
e9fdf0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.0.0->6.0.2Release Notes
rrousselGit/provider
v6.0.2Added error details for provider that threw during the creation (thanks to @jmewes)
v6.0.1Removed the assert that prevented from using
ChangeNotifierProviderwith notifiers that already had listeners.
v6.0.0Compare Source
Breaking: It is no longer possible to define providers where their
only difference is the nullability of the exposed value:
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 asModel. Previously, that would give aProviderNotFoundException.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
ProviderNotFoundExceptionif the provider is optional.
To do so, when calling
context.watch/context.read, make the generic typenullable. Such that instead of:
which will throw a
ProviderNotFoundExceptionif no matching providers are found,do:
which will try to obtain a matching provider. But if none are found,
nullwill 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.
This PR has been generated by WhiteSource Renovate. View repository job log here.