extended_text icon indicating copy to clipboard operation
extended_text copied to clipboard

[Help] How to properly override 'onTapUp' method for text?

Open emvaized opened this issue 3 years ago • 2 comments

To be more precise - I want to get 'TapUpDetails' in my 'onTap()' callback, provided to ExtendedText.rich.

Screenshot_20201229_222724

extended_text_library-4.03/lib/src/selection/extended-text-selection.dart/CommonTextSelectionGestureDetectorBuilder 2020-12-29_22-24

I saw the ExtendedTextSelectionGestureDetectorBuilder class in the same file, which has overridable method for this, but didn't find any documentation on how to use it Screenshot_20201229_223231

Thanks

emvaized avatar Dec 29 '20 20:12 emvaized

What is the purpose ?

zmtzawqlp avatar Dec 30 '20 01:12 zmtzawqlp

@zmtzawqlp I wrapped my Scaffold body in GestureDetector to play some animations depending on user tap coordinates, and ExtendedText.rich seems to absorb tap events, causing my code not to execute.

So I wanted to pass the same callback to the text widget, but didn't found how to get dx/dy coordinates when tapping on text

emvaized avatar Dec 30 '20 02:12 emvaized

you can use a widgetspan

zmtzawqlp avatar Jun 01 '23 05:06 zmtzawqlp