Closed MoeHamdan closed 4 years ago
Hi @MoeHamdan,
You should be able to do that by handling the tap on the child by GestureDetector
and then updating the state to change the show
property, here a quick example
class ExampleContainer extends StatefulWidget {
ExampleContainer({Key key}) : super(key: key);
@override
_ExampleContainerState createState() => _ExampleContainerState();
}
class _ExampleContainerState extends State<ExampleContainer> {
bool _sholdShow = false;
@override
Widget build(BuildContext context) {
return SimpleTooltip(
show: _sholdShow,
content: Text("content"),
child: GestureDetector(
onTap: () {
setState(() {
_sholdShow = true;
});
},
child: Container(),
),
);
}
}
Hope it helps
Hello
How can I show the tooltip when I tap on the child?