I am write a PreferredSizeWidget implementation. My widget wraps a single Text widget. To properly calculate the required height I need to multiply the text size by the MediaQuery.textScaleFactor.
The only way to know the size of the widget is to have access to the parent MediaQuery. I do not have access to the build context inside the PreferredSizeWidget getSize method.
How can I get around this limitation of PreferredSizeWidget?