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?
CodePudding user response:
Use Attr:
showCursor: true,
readOnly: true
CodePudding user response:
first wrap the textfield in GestureDetector, then try like this
GestureDetector(
onLongPress: (){
readOnly: true
},
onTap: //Do your action
)