Skip to content

Commit bb09755

Browse files
committed
Version 0.5.4
1 parent a80e429 commit bb09755

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.5.4] - August 31, 2018:
2+
3+
* Adds `onLinkTap` callback.
4+
15
## [0.5.3] - August 25, 2018:
26

37
* Adds support for `strike`, and `tt`.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ A Flutter widget for rendering static html tags as Flutter widgets. (Will render
88
Add the following to your `pubspec.yaml` file:
99

1010
dependencies:
11-
flutter_html: ^0.5.3
11+
flutter_html: ^0.5.4
1212

1313
## Currently Supported HTML Tags:
1414

15+
* `a`
1516
* `abbr`
1617
* `address`
1718
* `article`
@@ -82,7 +83,6 @@ Add the following to your `pubspec.yaml` file:
8283
### Partially supported elements:
8384
> These are common elements that aren't yet fully supported, but won't be ignored and will still render.
8485
85-
* `a`
8686
* `ol`
8787
* `ul`
8888

lib/html_parser.dart

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,21 @@ class HtmlParser {
101101
switch (node.localName) {
102102
case "a":
103103
return GestureDetector(
104-
child: DefaultTextStyle.merge(
105-
child: Wrap(
106-
children: _parseNodeList(node.nodes),
104+
child: DefaultTextStyle.merge(
105+
child: Wrap(
106+
children: _parseNodeList(node.nodes),
107+
),
108+
style: const TextStyle(
109+
decoration: TextDecoration.underline,
110+
color: Colors.blueAccent,
111+
decorationColor: Colors.blueAccent),
107112
),
108-
style: const TextStyle(
109-
decoration: TextDecoration.underline,
110-
color: Colors.blueAccent,
111-
decorationColor: Colors.blueAccent),
112-
),
113-
onTap: () {
114-
if (node.attributes.containsKey('href') && onLinkTap != null) {
115-
String url = node.attributes['href'];
116-
onLinkTap(url);
117-
}
118-
}
119-
);
113+
onTap: () {
114+
if (node.attributes.containsKey('href') && onLinkTap != null) {
115+
String url = node.attributes['href'];
116+
onLinkTap(url);
117+
}
118+
});
120119
case "abbr":
121120
return DefaultTextStyle.merge(
122121
child: Wrap(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_html
22
description: A Flutter widget for rendering static html tags as Flutter widgets. (Will render over 60 different html tags!)
3-
version: 0.5.3
3+
version: 0.5.4
44
author: Matthew Whitaker <sub6resources@gmail.com>
55
homepage: https://github.com/Sub6Resources/flutter_html
66

0 commit comments

Comments
 (0)