core icon indicating copy to clipboard operation
core copied to clipboard

Children are not updated properly when SizeClass is used in a Maker

Open kkoreilly opened this issue 7 months ago • 1 comments

Describe the bug

When you use SizeClass in a Maker to determine the children of a widget, it does not work correctly on app startup because it does not have the correct SizeClass when Update is initially called. You can work around this by just calling Update manually in OnShow when necessary.

We can't really work around this by using the system screen as a fallback for SizeClass, since we don't necessarily have it on mobile platforms at the right time. Also, we can't just check if the platform is mobile, since there are tablets and mobile devices can be turned horizontally.

How to reproduce

Run the docs without calling Update in OnShow.

Example code

No response

Relevant output

No response

Platform

macOS

kkoreilly avatar Jul 24 '24 04:07 kkoreilly