GlobalKeyExtension extension

on

Properties

globalOffset Offset?

Available on GlobalKey<State<StatefulWidget>>, provided by the GlobalKeyExtension extension

no setter
globalPaintBounds Rect?

Available on GlobalKey<State<StatefulWidget>>, provided by the GlobalKeyExtension extension

no setter

Methods

positionRelatedTo(GlobalKey<State<StatefulWidget>> targetKey, {Alignment position = Alignment.topCenter, Offset translate = Offset.zero, Offset padding = const Offset(4, 4)}) Offset?

Available on GlobalKey<State<StatefulWidget>>, provided by the GlobalKeyExtension extension

Return the global offset (top left) that the widget related to this key should assume to be positioned related to the target widget.
safePositionRelatedTo(GlobalKey<State<StatefulWidget>> targetKey, {Alignment position = Alignment.topCenter, Offset translate = Offset.zero, Offset padding = const Offset(4, 4), BuildContext? context, Offset screenCorrection = Offset.zero}) Offset?

Available on GlobalKey<State<StatefulWidget>>, provided by the GlobalKeyExtension extension

Same as calling positionRelatedTo, but the returned offset will never let the widget be positioned outside the screen.