flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

onLinkTap in Nested Html widget not working

Open javaone199 opened this issue 5 months ago • 0 comments

onLinkTap in Nested Html widget not working. For example,

Html(data: 'Hello <object id="foo"></object>',
    extensions: [
        TagExtension(
          tagsToExtend: {'object'},
          builder: (ExtensionContext ec) {
            return Column(children: [
               Text('Foo');
               Html(data: '<a href="mydomain.com">Click me</a>',
                    onLinkTap: (url, attributes, element) async {
                       debugPrint('launching url: $url');
                    },);
            ]);
          },
        ),
      ],
);

The link "Click me" is rendered, but the onLinkTap is never called when clicking it.

javaone199 avatar Feb 17 '24 19:02 javaone199