Answers for "make the text copy on button click flutter"

0

flutter how to create copy button

RaisedButton(
  child: Text('Copy'),
  onPressed: () {
    ClipboardManager.copyToClipBoard(
            _variableContainingString)
        .then((result) {
      final snackBar = SnackBar(
        content: Text('Copied to Clipboard'),
        action: SnackBarAction(
          label: 'Undo',
          onPressed: () {},
        ),
      );
      Scaffold.of(context).showSnackBar(snackBar);
    });
  },
),
Posted by: Guest on June-19-2021

Code answers related to "make the text copy on button click flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language