0

Imagine a button called from the butcontainer class and a button created in the project class, when the button created in the project class is clicked, the gesture detector used text is displayed on the screen, while the button called from the butcontainer class works properly but does not react on the screen. its my butcontainer class its my text class its called my text class (in project class) the top is my button called from the class, the bottom is my button created in the project class

I have no idea what to do please help

1 Answers1

0

Your gesture detector is not working because you have not included any callbacks in gesture detector.

It will work when you will include onTap or onLongPress like this

GestureDetector(
              onTap: (){},
              child: Container(child: Text("click me"),
   ),
),

it will work when you will include callbacks in it.