Vik*_*Jr. 0 textfield long-press flutter
这是从 flutter TextField 获取 onLongpress 调用的方法吗?它默认有一个 onTap 回调,但我需要 onLongpress ?
TextField(onLongpress : ()=>...
Run Code Online (Sandbox Code Playgroud)
详细行为:
如果我了解您的用例,我可以为您提供更直接的方法。
但这工作得很好。
InkWell(
onLongPress: () {
print("onlong Press");
},
child: IgnorePointer(
ignoring: true, // You can make this a variable in other toggle True or False
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Password',
hintText: 'Enter Password',
),
),
),
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
492 次 |
| 最近记录: |