Skip to content

obx kicks in ONLY after hot-reload! #1971

Answered by natgross
natgross asked this question in Q&A
Discussion options

You must be logged in to vote

AND the answer is...
You shouldn't build an obx wrapped widget as an argument to an else statement.
Here is a snippet of incompatible code:

           Container(                
                child: isSomeConditionTrue?
                    Text("-------------")
                    : Obx(
                        () => ListView.builder(...

When I removed the if-else, and had the Obx directly as the child, all is ok!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlimFreight
Comment options

Answer selected by natgross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants