SelectableText (Flutter Widget of the Week)
Why Stack Overflow recommends it
Stack Overflow users link it when answering Flutter questions about making text selectable or copyable, as a quick demo of the SelectableText widget.
Recommended by 3 people across 3 different months, 2019 to 2021.
What it is
A 1 minute 12 second entry in the Flutter team's "Widget of the Week" series, covering the SelectableText widget. It shows how to make displayed text selectable and copyable in a Flutter app.
What people said
Recommends BIS Tech · 2019-10 · Stack Overflow · on “Customize the Flutter TextField text selection button”
Create on longPressed on InkWell or GestureDetector. inside longPressed create showMenu Example: [LINK] Or You can user Selectable Widget. click here [this video]
Recommends David L. · 2019-11 · Stack Overflow · on “Is window copyable in Flutter”
If you want to copy text from your app, you can use the SelectableText widget. There was recently a Widget of the Week video on it here: [this video] There isn't a way to copy images or other data except for text, as far as I know.
Recommends Jay Dangar · 2020-08 · Stack Overflow · on “Flutter cannot select, copy or paste in EditableText”
Try Selectable Text instead of simple text widget. more info here [this video] . You can use TextField instead of Editable Text, this code works now. import 'package:flutter/material.dart'; class EditProfile extends StatefulWidget { @override _EditProfileState createState() => _EditProfileState(); } class _EditProfileState extends State<EditProfile> { var _controller = TextEditingController(); TextSelectionControls _mainContentSelectionController; @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: MediaQuery.of(context).size.height * 0.1, color: Co
Cites BIS Tech · 2019-10 · Stack Overflow · on “How to change text selection option in flutter?”
You can use Selectable Widget. more info - click here [this video] const SelectableText( 'Hello! How are you?', textAlign: TextAlign.center, style: TextStyle(fontWeight: FontWeight.bold), )
Cites M4X_ · 2020-02 · Stack Overflow · on “How to get the highlight widget from flutter web?”
To select text, simply use the selectableText widget. [this video] As for hovers, its supposed to be under the guestures widget, but there are work arounds. Work around 1 [LINK] Work around 2 [LINK]
Cites KuKu · 2020-06 · Stack Overflow · on “How to force show text selection controls?”
I hope it helps you. You can use Selectable Widget. [this video] Second suggestion When I test with below code, it works well. import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: "App", theme: new ThemeData(primarySwatch: Colors.amber), home: Test(), ); } } class Test extends StatefulWidget { @override _TestState createState() => _TestState(); } class _TestState extends State<Test> { TextEditingController controller = new TextEditingController(text: 'Kevin A'); @override Widget build(BuildCo
Cites Naimur Hasan · 2021-03 · Stack Overflow · on “How can I add my own toolbar option in flutter SelectableText Toolbar”
How can I add a toolbar option like " Find " in the SelectableText Widget. [LINK] The doc isn't satisfying I saw a demo in [this video]