tooltip<T extends DanmuModel> method
Implementation
Positioned? tooltip<T extends DanmuModel>(DanmuItem<T>? selectedItem) {
if (selectedItem == null) {
return null;
}
return Positioned(
key: selectedItem.valueKey("tooltip"),
left: _menuRect.left + (isUpward ? 0 : 4),
top: _menuRect.top + (isUpward ? 4 : 0),
child: SizedBox(
height: _menuRect.height,
width: _menuRect.width,
child: BubbleBox(
isUpward: isUpward,
pointerBias: pointerBias,
strokeWidth: 1.2,
borderRadius: 6,
pointerWidth: 8.25,
pointerHeight: 5.25,
peakRadius: 2.5,
isWrapped: false,
child: Padding(
padding: EdgeInsets.only(
top: isUpward ? 6 : 0,
bottom: isUpward ? 0 : 6,
),
child: tooltipContent,
),
),
),
);
}