Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

About operator priority problem #19

Open
ModWU opened this issue Dec 17, 2019 · 0 comments
Open

About operator priority problem #19

ModWU opened this issue Dec 17, 2019 · 0 comments

Comments

@ModWU
Copy link

ModWU commented Dec 17, 2019

Explain:
'||' > '??' Actually,
so 'parent?.updateShouldNotify(oldWidget.parent) ??
false || providers != oldWidget.providers' equals 'parent?.updateShouldNotify(oldWidget.parent) ??
providers != oldWidget.providers'

Suggestion:
change
"@OverRide
bool updateShouldNotify(_InheritedProviders oldWidget) {
return parent?.updateShouldNotify(oldWidget.parent) ??
false || providers != oldWidget.providers;
}"
to
"@OverRide
bool updateShouldNotify(_InheritedProviders oldWidget) {
return providers != oldWidget.providers ? true : (parent ?.updateShouldNotify(oldWidget.parent) ?? false);
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant