Skip to content

Commit bd19c57

Browse files
committed
Version 0.7.0
1 parent 71a7095 commit bd19c57

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.7.0] - September 10, 2018:
2+
3+
* Adds full support for `ul`
4+
15
## [0.6.2] - September 5, 2018:
26

37
* Adds check for `img src` before trying to load it.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ 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.6.2
11+
flutter_html: ^0.7.0
1212

1313
## Currently Supported HTML Tags:
14-
`a`, `abbr`, `acronym`, `address`, `article`, `aside`, `b`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `caption`, `cite`, `code`, `data`, `dd`, `del`, `dfn`, `div`, `dl`, `dt`, `em`, `figcaption`, `figure`, `footer`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `hr`, `i`, `img`, `ins`, `kbd`, `li`, `main`, `mark`, `nav`, `noscript`, `p`, `pre`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `section`, `small`, `span`, `strike`, `strong`, `table`, `tbody`, `td`, `template`, `tfoot`, `th`, `thead`, `time`, `tr`, `tt`, `u`, `var`
14+
`a`, `abbr`, `acronym`, `address`, `article`, `aside`, `b`, `bdi`, `bdo`, `big`, `blockquote`, `body`, `br`, `caption`, `cite`, `code`, `data`, `dd`, `del`, `dfn`, `div`, `dl`, `dt`, `em`, `figcaption`, `figure`, `footer`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `hr`, `i`, `img`, `ins`, `kbd`, `li`, `main`, `mark`, `nav`, `noscript`, `p`, `pre`, `q`, `rp`, `rt`, `ruby`, `s`, `samp`, `section`, `small`, `span`, `strike`, `strong`, `table`, `tbody`, `td`, `template`, `tfoot`, `th`, `thead`, `time`, `tr`, `tt`, `u`, `ul`, `var`
1515

1616
### Partially supported elements:
1717
> These are common elements that aren't yet fully supported, but won't be ignored and will still render somewhat correctly.
1818
19-
`center`, `ol` , `ul`
19+
`center`, `ol`
2020

2121
### List of _planned_ supported elements:
2222
> These are elements that are planned, but present a specific challenge that makes them somewhat difficult to implement.

lib/html_parser.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,15 @@ class HtmlParser {
473473
);
474474
case "li":
475475
String type = node.parent.localName; // Parent type; usually ol or ul
476-
EdgeInsets markPadding = EdgeInsets.symmetric(horizontal: 4.0);
476+
const EdgeInsets markPadding = EdgeInsets.symmetric(horizontal: 4.0);
477477
Widget mark;
478478
switch (type) {
479479
case "ul":
480480
mark = Container(child: Text('•'), padding: markPadding);
481481
break;
482-
case "ol": //TODO Use index as mark
483-
mark = Container(child: Text('•'), padding: markPadding);
482+
case "ol":
483+
int index = node.parent.children.indexOf(node) + 1;
484+
mark = Container(child: Text("$index."), padding: markPadding);
484485
break;
485486
default: //Fallback to middle dot
486487
mark = Container(width: 0.0, height: 0.0);

pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,4 @@ packages:
375375
version: "2.1.15"
376376
sdks:
377377
dart: ">=2.0.0-dev.68.0 <3.0.0"
378-
flutter: ">=0.5.0 <0.8.0"
378+
flutter: ">=0.5.0"

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 70 different html tags!)
3-
version: 0.6.2
3+
version: 0.7.0
44
author: Matthew Whitaker <sub6resources@gmail.com>
55
homepage: https://github.com/Sub6Resources/flutter_html
66

0 commit comments

Comments
 (0)