I need to display a styled text for reading and some actions. User should be able to select piece of text and mark it with color, save it or expand it (show an additional information, for example a translation to another language).
I can display text by using RichText widget.
1) How to make it selectable and how/where to add onTextSelected listener? There is a class TextSelection but I can't see how/where its used.
2) What is a simplest way to expand text? I can reload full text (with changes added) and totally update widget, but this will result to scrolling to the top of a text and I think there should be a better approach.