fluent_ui
fluent_ui copied to clipboard
🐛 Unexpected jitter on `MenuFlyoutSubItem` appears
When the MenuFlyoutSubItem appears, it quickly moves a short distance to the lower right corner.
https://github.com/bdlukaa/fluent_ui/assets/40336192/8d3a0592-5ce8-4058-b8ab-de450ca35bec
This behavior can be confirmed in the example app too.
This is probably because of the following lines:
https://github.com/bdlukaa/fluent_ui/blob/9c0840dc33af9d0641285b22dcda4bc553159db3/lib/src/controls/flyouts/content_manager.dart#L63-L72
The sub items doesn't get to know the box size at the very first frame, causing this jitter.
Yeah. I think that is the root cause. I build and run the example without the post frame callback, and the jitter is gone. But the FlyoutListTile size doesn't get right:
Yeah. To fix this, we'd need to make use of Flutter box system - which is kind of complex. We already do it for other widgets, like ComboBox.