I am trying to implement a feature in Flutter in which user will be able to display additional information after clicking on the specific icon or image. I would like to display a small annotation above selected icon. The example of what i would like to achive is in the screen below.
Is there any ready to use widget for this feature?
CodePudding user response:
you can use Tooltip widget for this as bellow
Tooltip(
message: "This is the tool tip",
child: Icon(Icons.add),
),
when you long press on the icon the message will be shown like this.
CodePudding user response:
You can do this by using Stack. Place the Button first where you want the Stack to be.
You can write the information you want to put on top of the button in Positioned() inside the Stack.
Set a variable, show information when this variable is True otherwise hide it.
You can also use GestureDedector if you want it to close when you touch anywhere.