jesusrp98 / expand_widget

Ability to easily expand and retract a widget collection or text
https://pub.dev/packages/expand_widget
GNU General Public License v3.0
45 stars 22 forks source link

Expanded text selectable? #19

Closed lucasjinreal closed 2 years ago

lucasjinreal commented 4 years ago

thanks for this useful lib. is that possible add a property to make text can be selectable as well?

jesusrp98 commented 4 years ago

I can implement this feature @jinfagang. What about adding a new boolean property called isSelectable that makes the base widget to use the SelectableText widget instead of a simple Textwidget?

Do you need anything more from this feature?

lucasjinreal commented 4 years ago

@jesusrp98 Sorry for the late reply. I found another issue about this widget: when using it in a raw and which belongs to a listview, it will over take scroll gesture detector make the listview not able to scroll, except I scroll on area else.

jesusrp98 commented 4 years ago

Yes, this behavior can be fixed by telling the widget to ignore gestures all togheter, it's ne only way :/

jesusrp98 commented 4 years ago

About the selecting text option, this feature is harder to implement than I initially thought. It'll be implemented in a future version.

JamesMcIntosh commented 3 years ago

Hi @jesusrp98, just wondering what were the issues you saw with SelectableText.

eliper3 commented 3 years ago

Love your library. Looking for such a feature for selectable text as well. Thank you.

jesusrp98 commented 3 years ago

Hey! So in the last couple days I've been investigating the SelectableText widget, and I found that it doesn't have a overflow property, so I should find another way to implement the overflow feature.

If you feel that you could help with this let me know! Hopefully I could do some work on this weekend.

jesusrp98 commented 3 years ago

So it seems that currently, the overflow visualization doesn't work properly on editable text widgets, as exposed here.

There's an open PR at this moment by the one and only @pedromassango that fixes this issue. When this get merged and carried to a stable Flutter release, I'll include this functionality to the package, since it's not difficult to implement.

I just don't want the SelectableText widget to not render overflow correctly, as a normal Text widget would do. @jinfagang @JamesMcIntosh @eliper3

jesusrp98 commented 2 years ago

This is now possible thanks the possiblity of revealing a section of the 'exandable' widget. You can use ExpandChild, and set the collapsedVisibilityFactor as you please.

Please feel free to reopen the issue if you think it's necessary :)

Sorry for taking so long to fix this :)