|
@@ -79,9 +79,10 @@ class _CodeWidgetState extends State<CodeWidget> {
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
),
|
|
|
onTap: () {
|
|
|
- FlutterClipboard.copy(_getTotp()).then(
|
|
|
- (value) => showToast(context, "Copied to clipboard"),
|
|
|
- );
|
|
|
+ _copyToClipboard();
|
|
|
+ },
|
|
|
+ onLongPress: () {
|
|
|
+ _copyToClipboard();
|
|
|
},
|
|
|
child: SizedBox(
|
|
|
child: Column(
|
|
@@ -155,6 +156,12 @@ class _CodeWidgetState extends State<CodeWidget> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ void _copyToClipboard() {
|
|
|
+ FlutterClipboard.copy(_getTotp()).then(
|
|
|
+ (value) => showToast(context, "Copied to clipboard"),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
void _onDeletePressed(_) {
|
|
|
final AlertDialog alert = AlertDialog(
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|