rx_notifier
rx_notifier copied to clipboard
Misleading "No Rx variables in that space" debug message in nested RxBuilder
When I using nested RxBuilder, I found that the "No Rx variables in that space" debug message could be misleading.
For example, consider the following nested RxBuilder structure. RxBuilderC is the real one which does not have Rx variables. But the debug message is telling me it is RxBuilderD.
It's because the order of RxBuilder's constructor is not the same as RxMixin's untrack(). But I can't find a better way to fix it.
Order of assigning "_stackTrace = StackTrace.current" in RxBuilder's constructor
1 RxBuilderA ──┐
│
│
│
│
2 RxBuilderB ──┼────── 4 RxBuilderD
│ (No Rx variable)
│ WRONG!!!
│
│
3 RxBuilderC ──┘
Order of calling untrack(_stackTrace) in RxMixin
1 RxBuilderA ──┐
│
│
│
│
2 RxBuilderB ──┼────── 3 RxBuilderD
│
│
│
│
4 RxBuilderC ──┘
(No Rx variable)