In this question Whats the difference between double.infinity and MediaQuery? Rémi Rousselet suggested to use IntrinsicHeight Widget instead of MediaQuery. I want to understand the advantage of IntrinsicHeight over MediaQuery as when I read the documentation I found this-
IntrinsicHeight: This class is relatively expensive, because it adds a speculative layout pass before the final layout phase. Avoid using it where possible. In the worst case, this widget can result in a layout that is O(N²) in the depth of the tree.
So the above says that the later is more expensive and should be avoided wherever possible, then why should we use IntrinsicHeight instead of simply MediaQuery?