@@ -6,6 +6,7 @@ import 'package:csslib/parser.dart' as cssparser;
66import 'package:csslib/visitor.dart' as css;
77import 'package:flutter/gestures.dart' ;
88import 'package:flutter/material.dart' ;
9+ import 'package:flutter/rendering.dart' ;
910import 'package:flutter_html/flutter_html.dart' ;
1011import 'package:flutter_html/image_render.dart' ;
1112import 'package:flutter_html/src/anchor.dart' ;
@@ -411,6 +412,7 @@ class HtmlParser extends StatelessWidget {
411412 InlineSpan addTaps (InlineSpan childSpan, TextStyle childStyle) {
412413 if (childSpan is TextSpan ) {
413414 return TextSpan (
415+ mouseCursor: SystemMouseCursors .click,
414416 text: childSpan.text,
415417 children: childSpan.children
416418 ? .map ((e) => addTaps (e, childStyle.merge (childSpan.style)))
@@ -426,29 +428,34 @@ class HtmlParser extends StatelessWidget {
426428 );
427429 } else {
428430 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 (
435435 onTap: _onAnchorTap != null
436- ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
436+ ? () => _onAnchorTap !(tree.href, context, tree.attributes, tree.element)
437437 : 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+ ),
439445 ),
440446 ),
441447 );
442448 }
443449 }
444450
445451 return TextSpan (
452+ mouseCursor: SystemMouseCursors .click,
446453 children: tree.children
447454 .map ((tree) => parseTree (newContext, tree))
448455 .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 (),
452459 );
453460 } else if (tree is LayoutElement ) {
454461 return WidgetSpan (
0 commit comments