styled_widget icon indicating copy to clipboard operation
styled_widget copied to clipboard

Newfeature : Add selectable merhod

Open wer-mathurin opened this issue 4 years ago • 2 comments

Add support for https://api.flutter.dev/flutter/material/SelectableText-class.html

This is something very useful for flutter web.

wer-mathurin avatar Nov 24 '20 05:11 wer-mathurin

Could you give an example on how you think this should work? I would gladly accept a pull request which implements this in a nice way!

ReinBentdal avatar Feb 06 '22 19:02 ReinBentdal

@ReinBentdal I can imagine the same way as it work for the widget Text. Currently I d not have time for PR. But, I usually do when I have time !
But I think commun use case is const SelectableText( 'Hello! How are you?', textAlign: TextAlign.center, style: TextStyle(fontWeight: FontWeight.bold), )

So if the widget is a SelectableText....using the usual styling method would be a great addition. var selectable = SelectableText('SOME_TEXT).fontSize().textColor(...);

And nice to have: var text = Text('SOME_TEXT').selectable(web: true, android: false, ios: false)

wer-mathurin avatar Feb 07 '22 16:02 wer-mathurin