presentation/widgets/flame_tracked_overlay library

Classes

FlameTrackedOverlay
Bridges a Flame FlameGame's world-space entity position to a Flutter widget that lives in the same Stack as the game's GameWidget — a TooltipBubble, a damage-number Text, an HP-bar-style widget that should visually track a moving/resizing/panning entity.

Functions

worldToScreenOffset({required CameraComponent camera, required Vector2 worldPosition, required Offset gameWidgetTopLeft}) → Offset
Converts a Flame world-space worldPosition (e.g. a component's position) into an on-screen Flutter Offset, via camera's own localToGlobal (which already accounts for viewfinder pan/zoom and viewport scaling — see camera_component.dart in the flame package).