-
-
Notifications
You must be signed in to change notification settings - Fork 913
Closed
Labels
bugSomething isn't workingSomething isn't working

Description
Describe the bug:
The a tag must not show underline or any decoration when link (href) is not present.
HTML to reproduce the issue:
<html>
<body>
<br/>
<a>test 1</a>
<br/>
<a href="">test 2</a>
<br/>
<a href="/test">test 3</a>
</p>
</body>
</html>
Html
widget configuration:
@override
Widget build(BuildContext context) {
return Html(
data: html,
onAnchorTap: (String? url, RenderContext context, Map<String, String> attributes, dynamic element) {
if (url == null) return;
openLink(url);
},
onLinkTap: (String? url, RenderContext context, Map<String, String> attributes, dynamic element) {
if (url == null) return;
openLink(url);
},
);
}
Expected behavior:
Screenshots:
Device details and Flutter/Dart/flutter_html
versions:
flutter_html: 2.2.1
Flutter version 2.5.3
Testing on Flutter web Chrome
Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.55
Stacktrace/Logcat
Additional info:
A picture of a cute animal (not mandatory but encouraged)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working