skip to Main Content

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.

enter image description here

Is there any ready to use widget for this feature?

2

Answers


  1. 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.

    Login or Signup to reply.
  2. 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.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search