How to detect taps inside of the CodeEditor?
Prince2347X opened this issue · comments
I've tried wrapping the CodeEditor in GestureDetector() but it doesn't seem to work and onTap doesn't exist for CodeEditor, I'm wondering what do I need to do to fire a callback when the user taps the CodeEditor region?
Hello! @Prince2347X
Please try passing a FocusNode
to the CodeField
and listening to the focus change events.
If you don't need some specific taps like LongPress
or DoubleTap
, this should work.
Okay, Thank you @yescorp, I wrapped the CodeField
in TapRegion
and it's working. But why onTap
is not available for the CodeField
widget if it's just wrapped to a TextField
? Is there any issue with it or it is planned for future?
Honestly, you guys should fix this one..it's in the default code text field