Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newfeature : Add selectable merhod #53

Open
wer-mathurin opened this issue Nov 24, 2020 · 2 comments
Open

Newfeature : Add selectable merhod #53

wer-mathurin opened this issue Nov 24, 2020 · 2 comments

Comments

@wer-mathurin
Copy link

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

This is something very useful for flutter web.

@ReinBentdal
Copy link
Owner

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!

@wer-mathurin
Copy link
Author

wer-mathurin commented Feb 7, 2022

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants