Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.75k stars 805 forks source link

onLinkTap in Nested Html widget not working #1412

Open javaone199 opened 3 months ago

javaone199 commented 3 months ago

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.