Home > database >  Flutter - Add a Tappable Icon to the TextField label - onTap not executing
Flutter - Add a Tappable Icon to the TextField label - onTap not executing

Time:07-01

I'm trying all sorts of things to add a little tappable icon to a textField that moves up and down with the floating label:

enter image description here

However, everything I try just focuses the text field on tap, and does not execute the onTap event of the icon, so the icon is not tappable.

I tried a Stack, but onTap did not execute. Then I tried enter image description here

CodePudding user response:

Try it like this:

 onTap: () {print('tap');},
  • Related