Wrapping Non-Widget in Obx possible? #2411
Unanswered
sidetraxaudio
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
-
(Specifically wrapping a custom class that returns a widget in order to access it's instance variables)
Hi.
Widget widget1 = Obx(() => CustomWidget({boolThatINeed: true})
Instantiating as abstract class 'Widget' doesnt give me acces to widget1.boolThatIneeed.
BUT
``CustomWidget widget2 = Obx(() => CustomWidget({boolThatINeed: true})
Gives me access to widget2.boolThatINeed, but does NOT work with OBX, as obx seems to work with Widget, even though CustomWidget returns a widget.
Any help on this? Its driving me nuts.
Beta Was this translation helpful? Give feedback.
All reactions