I used the super_tooltip package to create my tooltip. Here I want to change the position of the arrowhead of the tooltip. How can I do it? (Like below image - blue color arrow)
tooltip = SuperTooltip(
popupDirection: TooltipDirection.down,
arrowBaseWidth: 15.0,
arrowLength: 20.0,
borderColor: Colors.white,
borderRadius: 0,
hasShadow: false,
minimumOutSidePadding: 10,
content: new Material(
child: Text(
"Lorem ipsum dolor sit amet, consetetur sadipscingelitr, "
softWrap: true,
)),
);
CodePudding user response:
The SuperTooltip uses the passed context to determine the target center. So to fix this issue, You can wrap that button in a builder and pass it's context to the show function:
Builder(
builder: (childContext) => IconButton(
onPressed: () {
tooltip.show(childContext);
},
icon: const Icon(Icons.info_rounded),
),
),
Read more about Builder