Anchoring Floating UI in Flutter with CompositedTransformTarget and CompositedTransformFollower
Dropdown menus, autocomplete suggestions, tooltips, popovers, context menus — almost every app eventually needs a piece of UI that floats above the rest of the layout and stays glued to some other widget. The hard part is never drawing the floating panel. The hard part is keeping it pinned to its anchor when the anchor scrolls, when the screen rotates, or when the layout shifts.