copy to clipboard flutter
import 'package:flutter/services.dart';
ClipboardData data = ClipboardData(text: '<Text to copy goes here>');
await Clipboard.setData(data);
copy to clipboard flutter
import 'package:flutter/services.dart';
ClipboardData data = ClipboardData(text: '<Text to copy goes here>');
await Clipboard.setData(data);
button copy to clipboard flutter
Container(
width: double.maxFinite,
child: RaisedButton.icon(
color: Colors.blue,
onPressed: () {
var data = jsonEncode(command.dioError);
Clipboard.setData(ClipboardData(text: data.toString()));
snackBar();
},
label: Text('Copy error to clipboard', style: TextStyle(color: Colors.white)),
icon: Icon(Icons.copy, color: Colors.white),
textColor: Colors.white,
splashColor: Colors.blueAccent,
),
),
clipboard flutter
dependencies:
clipboard: ^0.1.2+8
paste clipboard flutter
Clipboard.getData(Clipboard.kTextPlain).then((value){
print(value.text); //value is clipbarod data
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us