In Notifier
, should any late initialized properties be initialized in built()
#2006
hamishjohnson
started this conversation in
General
Replies: 1 comment
-
Yes, so that in Notifier shouldn't have constructors. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Notifier provider like so
This works well, except when I move the
sharedPref = Share...
code into the constructor. For some reason, it seemsbuild
is called before the constructor, and so any late properties accessed in build will error if you initialize it in the constructor.Beta Was this translation helpful? Give feedback.
All reactions