Best way to access state variables #791
Unanswered
dlewis2017
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
What's the best way to access state variables as you would normally do without freezed? There seems to be multiple ways such as
maybeWhen,maybeOrNull,when, etc.More specifically, what's the best way to access optional state parameters that can be null? For example I want
.whenOrNullto return one, optional, variable when a state gets emitted. The result fromloadedin below example ofstate.whenOrNullseems to throw an error when position isn't defined expecting it to be.E.g.
Beta Was this translation helpful? Give feedback.
All reactions