We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a68957b commit 7c747bbCopy full SHA for 7c747bb
lib/src/utils/ansi_parser.dart
@@ -1,4 +1,6 @@
1
+import 'package:flutter/gestures.dart';
2
import 'package:flutter/material.dart';
3
+import 'package:flutter/services.dart';
4
5
class AnsiParser {
6
static const TEXT = 0, BRACKET = 1, CODE = 2;
@@ -117,11 +119,15 @@ class AnsiParser {
117
119
118
120
TextSpan createSpan(String text) {
121
return TextSpan(
- text: text,
- style: TextStyle(
122
- color: foreground,
123
- backgroundColor: background,
124
- ),
125
- );
+ text: text,
+ style: TextStyle(
+ color: foreground,
+ backgroundColor: background,
126
+ ),
127
+ recognizer: LongPressGestureRecognizer()
128
+ ..onLongPress = () {
129
+ Clipboard.setData(ClipboardData(text: text));
130
+ // Toast.toast("Copy to paste board");
131
+ });
132
}
133
0 commit comments