@@ -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,
@@ -371,7 +376,7 @@ class HtmlParser extends StatelessWidget {
371376 : childStyle.merge (childSpan.style)),
372377 semanticsLabel: childSpan.semanticsLabel,
373378 recognizer: TapGestureRecognizer ()
374- ..onTap = () => onLinkTap? .call (tree.href),
379+ ..onTap = () => onLinkTap? .call (tree.href, context, tree.attributes, tree.element ),
375380 );
376381 } else {
377382 return WidgetSpan (
@@ -382,7 +387,7 @@ class HtmlParser extends StatelessWidget {
382387 MultipleTapGestureRecognizer >(
383388 () => MultipleTapGestureRecognizer (),
384389 (instance) {
385- instance..onTap = () => onLinkTap? .call (tree.href);
390+ instance..onTap = () => onLinkTap? .call (tree.href, context, tree.attributes, tree.element );
386391 },
387392 ),
388393 },
0 commit comments