@@ -6,6 +6,7 @@ import 'package:csslib/parser.dart' as cssparser;
6
6
import 'package:csslib/visitor.dart' as css;
7
7
import 'package:flutter/gestures.dart' ;
8
8
import 'package:flutter/material.dart' ;
9
+ import 'package:flutter/rendering.dart' ;
9
10
import 'package:flutter_html/flutter_html.dart' ;
10
11
import 'package:flutter_html/image_render.dart' ;
11
12
import 'package:flutter_html/src/anchor.dart' ;
@@ -411,6 +412,7 @@ class HtmlParser extends StatelessWidget {
411
412
InlineSpan addTaps (InlineSpan childSpan, TextStyle childStyle) {
412
413
if (childSpan is TextSpan ) {
413
414
return TextSpan (
415
+ mouseCursor: SystemMouseCursors .click,
414
416
text: childSpan.text,
415
417
children: childSpan.children
416
418
? .map ((e) => addTaps (e, childStyle.merge (childSpan.style)))
@@ -426,29 +428,34 @@ class HtmlParser extends StatelessWidget {
426
428
);
427
429
} else {
428
430
return WidgetSpan (
429
- child: MultipleTapGestureDetector (
430
- onTap: _onAnchorTap != null
431
- ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
432
- : null ,
433
- child: GestureDetector (
434
- key: AnchorKey .of (key, tree),
431
+ child: MouseRegion (
432
+ key: AnchorKey .of (key, tree),
433
+ cursor: SystemMouseCursors .click,
434
+ child: MultipleTapGestureDetector (
435
435
onTap: _onAnchorTap != null
436
- ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
436
+ ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
437
437
: null ,
438
- child: (childSpan as WidgetSpan ).child,
438
+ child: GestureDetector (
439
+ key: AnchorKey .of (key, tree),
440
+ onTap: _onAnchorTap != null
441
+ ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
442
+ : null ,
443
+ child: (childSpan as WidgetSpan ).child,
444
+ ),
439
445
),
440
446
),
441
447
);
442
448
}
443
449
}
444
450
445
451
return TextSpan (
452
+ mouseCursor: SystemMouseCursors .click,
446
453
children: tree.children
447
454
.map ((tree) => parseTree (newContext, tree))
448
455
.map ((childSpan) {
449
- return addTaps (childSpan,
450
- newContext.style.generateTextStyle ().merge (childSpan.style));
451
- }).toList (),
456
+ return addTaps (childSpan,
457
+ newContext.style.generateTextStyle ().merge (childSpan.style));
458
+ }).toList (),
452
459
);
453
460
} else if (tree is LayoutElement ) {
454
461
return WidgetSpan (
0 commit comments