SelectableText does not allow to get selected text?

449 views
Skip to first unread message

Georgii Dernovyi

unread,
Oct 25, 2019, 8:43:47 AM10/25/19
to Flutter Development (flutter-dev)
I try to get the selected text from SelectableText.rich(Textspan(..)) but do not see an opportunity to get it. How to?
I want to get selected text when user finishes to select..
Message has been deleted

Georgii Dernovyi

unread,
Oct 27, 2019, 5:34:51 AM10/27/19
to Flutter Development (flutter-dev)

I develop for desktop that is why I see it does not work all.  The inner SelectableText toolbar does not appear, stupid code design does not allow to get selection without deep rewriting of sources. It seems nobody checks the code before releasing for desktops.  Never code review. :(

пятница, 25 октября 2019 г., 19:43:47 UTC+7 пользователь Georgii Dernovyi написал:

Chun-Heng Tai

unread,
Oct 28, 2019, 12:04:36 PM10/28/19
to Flutter Development (flutter-dev)
You have mentioned two things. I do agree we should have a way to retrieve selected text from selectabletext. Please file an feature request in github so that flutter team can address the concern.
On the other hands, I am not quite sure what the inner SelectableText toolbar is referring to. Do you mean the Context menu that has copy, paste, and select all? and which platform are you developing on?
flutter in desktop is still in beta, and thus it might be unstable. We are still in the process of improving it.

Georgii Dernovyi

unread,
Oct 28, 2019, 1:19:49 PM10/28/19
to Flutter Development (flutter-dev)
Hi and thanks for the answer!

понедельник, 28 октября 2019 г., 23:04:36 UTC+7 пользователь Chun-Heng Tai написал:
You have mentioned two things. I do agree we should have a way to retrieve selected text from selectabletext.
Interesting point of view.
 
Please file an feature request in github so that flutter team can address the concern.
On the other hands, I am not quite sure what the inner SelectableText toolbar is referring to. Do you mean the Context menu that has copy, paste, and select all? and which platform are you developing on?
Yes.  
flutter in desktop is still in beta, and thus it might be unstable. We are still in the process of improving it.
Desktop is declared as a supported platform. But anyway code of  SelectableText is almost useless. For desktops for sure. It has to support at least a handler for changing selection.
I write here, not in git, because may be I am wrong and everything is ok )

Chun-Heng Tai

unread,
Oct 28, 2019, 1:43:47 PM10/28/19
to Flutter Development (flutter-dev)


On Monday, October 28, 2019 at 10:19:49 AM UTC-7, Georgii Dernovyi wrote:
Hi and thanks for the answer!

понедельник, 28 октября 2019 г., 23:04:36 UTC+7 пользователь Chun-Heng Tai написал:
You have mentioned two things. I do agree we should have a way to retrieve selected text from selectabletext.
Interesting point of view.
 
Please file an feature request in github so that flutter team can address the concern.
On the other hands, I am not quite sure what the inner SelectableText toolbar is referring to. Do you mean the Context menu that has copy, paste, and select all? and which platform are you developing on?
Yes.
We have existing github issues regarding this
The mobile behavior does not feel native to desktop that is why we do not show toolbar in desktop. We are in the progress of implementing right click context menu. 

Georgii Dernovyi

unread,
Oct 28, 2019, 2:32:28 PM10/28/19
to Flutter Development (flutter-dev)
For desktop apps popup menu is not important. At all. But handlers and others obvious methods from widget name(functionality) are required.

вторник, 29 октября 2019 г., 0:43:47 UTC+7 пользователь Chun-Heng Tai написал:

Chun-Heng Tai

unread,
Oct 28, 2019, 2:41:55 PM10/28/19
to Flutter Development (flutter-dev)
What are the handlers and obvious methods you referring to?
If you are talking about retrieving selected value, that is something we should fix, and please file an issue for it.
Other than that, the text is currently selectable in desktop. The functionality after you select a text is mainly rely on the pop up menu, which will require the above two github issues to be fixed first.
Am i missing anything else?

Georgii Dernovyi

unread,
Oct 29, 2019, 6:04:44 AM10/29/19
to Flutter Development (flutter-dev)


вторник, 29 октября 2019 г., 1:41:55 UTC+7 пользователь Chun-Heng Tai написал:
What are the handlers and obvious methods you referring to?
String getSelectableText or TextSelection getSelection. 
If you are talking about retrieving selected value, that is something we should fix, and please file an issue for it.
Other than that, the text is currently selectable in desktop.
Nope, It is selectable visually but not not in class interface. For what it is if I can not use it in a program?? 
The functionality after you select a text is mainly rely on the pop up menu, which will require the above two github issues to be fixed first.
Am i missing anything else?
 only getSelection method and onSelection handler.

G Spencer

unread,
Oct 29, 2019, 8:28:08 PM10/29/19
to Flutter Development (flutter-dev)
On Monday, October 28, 2019 at 10:19:49 AM UTC-7, Georgii Dernovyi wrote:
flutter in desktop is still in beta, and thus it might be unstable. We are still in the process of improving it.
Desktop is declared as a supported platform.

Actually, no, desktop is not yet a supported platform.  Flutter for Desktop is a technology preview at this time, and is under active development, so you will encounter a lot of places where it is not yet complete until it is a supported platform, and we don't recommend shipping production apps on a technology preview.  Please do file bugs, however, as we will try to address them as part of our ongoing work.

-Greg. (Flutter Desktop TL)

G Spencer

unread,
Oct 30, 2019, 12:24:33 PM10/30/19
to Flutter Development (flutter-dev)
Actually, I was reminded that desktop isn't even officially a technology preview: it's an experiment that is on its way to becoming a technology preview.

Regardless, my point still stands: it's not yet a supported platform.

-Greg.

Thomas Verbeek

unread,
Oct 31, 2019, 4:24:48 AM10/31/19
to G Spencer, Flutter Development (flutter-dev)
Greg,

thanks for clarification. I think we are all happy and thankful for all the hard work you and your team put into making Flutter available for the desktop (and the browser).
It’s is so cool, that Google decided to make this an open and transparent development process.

As a guideline for others I can say that my company will release a small client application based on Flutter Desktop (Mac) probably early next year - regardless of the status as a supported platform. We are fully aware that things might break later and that Google cannot be held responsible for that. This is due to the fact that there is no alternative if you want to write platform independent source code.

Happy helloween from Hamburg, Germany!

Tom.

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/6fcfd928-f27f-40f5-843c-408f7eb3079c%40googlegroups.com.

Wayne Werner

unread,
Nov 1, 2019, 10:53:13 AM11/1/19
to Flutter Development (flutter-dev)
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages