'Flutter: TextField_How can I make TextField not foucs when I long-press it?

I'm developing an application that has to reorder some elements when I long press it and drag-drop it. Some of the elements has TextField, so when I long press that Element(to reorder with other elements), the TextField is on focus and keyboard appears. I want to make TextField on focus only on tap, not on longPress. Can I make it possible?



Solution 1:[1]

first wrap the textfield in GestureDetector, then try like this

           GestureDetector(
              onLongPress: (){
                readOnly: true
              },
              onTap: //Do your action

            )

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Taqi Tahmid Tanzil