File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ class TextLine extends StatelessWidget {
184
184
final style = textNode.style;
185
185
var res = const TextStyle (); // This is inline text style
186
186
final color = textNode.style.attributes[Attribute .color.key];
187
+ var hasLink = false ;
187
188
188
189
< String , TextStyle ? > {
189
190
Attribute .bold.key: defaultStyles.bold,
@@ -203,6 +204,9 @@ class TextLine extends StatelessWidget {
203
204
res = _merge (res.copyWith (decorationColor: textColor),
204
205
s! .copyWith (decorationColor: textColor));
205
206
} else {
207
+ if (k == Attribute .link.key) {
208
+ hasLink = true ;
209
+ }
206
210
res = _merge (res, s! );
207
211
}
208
212
}
@@ -252,6 +256,13 @@ class TextLine extends StatelessWidget {
252
256
}
253
257
254
258
res = _applyCustomAttributes (res, textNode.style.attributes);
259
+ if (hasLink && readOnly) {
260
+ return TextSpan (
261
+ text: textNode.value,
262
+ style: res,
263
+ mouseCursor: SystemMouseCursors .click,
264
+ );
265
+ }
255
266
return TextSpan (text: textNode.value, style: res);
256
267
}
257
268
You can’t perform that action at this time.
0 commit comments