@@ -16,7 +16,12 @@ import 'package:html/dom.dart' as dom;
1616import 'package:html/parser.dart' as htmlparser;
1717import 'package:webview_flutter/webview_flutter.dart' ;
1818
19- typedef OnTap = void Function (String url);
19+ typedef OnTap = void Function (
20+ String url,
21+ RenderContext context,
22+ Map <String , String > attributes,
23+ dom.Element element,
24+ );
2025typedef CustomRender = dynamic Function (
2126 RenderContext context,
2227 Widget parsedChild,
@@ -358,7 +363,7 @@ class HtmlParser extends StatelessWidget {
358363 : childStyle.merge (childSpan.style)),
359364 semanticsLabel: childSpan.semanticsLabel,
360365 recognizer: TapGestureRecognizer ()
361- ..onTap = () => onLinkTap? .call (tree.href),
366+ ..onTap = () => onLinkTap? .call (tree.href, context, tree.attributes, tree.element ),
362367 );
363368 } else {
364369 return WidgetSpan (
@@ -369,7 +374,7 @@ class HtmlParser extends StatelessWidget {
369374 MultipleTapGestureRecognizer >(
370375 () => MultipleTapGestureRecognizer (),
371376 (instance) {
372- instance..onTap = () => onLinkTap? .call (tree.href);
377+ instance..onTap = () => onLinkTap? .call (tree.href, context, tree.attributes, tree.element );
373378 },
374379 ),
375380 },
0 commit comments