-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
For TextSelectionToolbars and SpellCheckSuggestionsToolbar, there is a Padding widget in the Overlay that helps the toolbars naturally position themselves with respect to the device's screen padding. Usually this is included via an app's Scaffold, but inside of an Overlay it's not there.
Currently, the Padding widget seems to include padding that's related to the toolbar (_kToolbarContentDistanceBelow
), and the toolbar's anchor also compensates for screen padding that should be done via Padding (mediaQueryData.padding.top
).
Instead, ideally the Padding would set all of the device screen padding and the anchor would just position itself within it. That would make the positioning logic much easier and more inline with how Flutter usually handles this.
References
- SpellCheckSuggestionsToolbar PR: Fragile padding and anchor math for toolbars #117221
- TextSelectionToolbar code:
return Padding(