File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -472,10 +472,27 @@ class HtmlParser {
472
472
),
473
473
);
474
474
case "li" :
475
+ String type = node.parent.localName; // Parent type; usually ol or ul
476
+ EdgeInsets markPadding = EdgeInsets .symmetric (horizontal: 4.0 );
477
+ Widget mark;
478
+ switch (type) {
479
+ case "ul" :
480
+ mark = Container (child: Text ('•' ), padding: markPadding);
481
+ break ;
482
+ case "ol" : //TODO Use index as mark
483
+ mark = Container (child: Text ('•' ), padding: markPadding);
484
+ break ;
485
+ default : //Fallback to middle dot
486
+ mark = Container (width: 0.0 , height: 0.0 );
487
+ break ;
488
+ }
475
489
return Container (
476
490
width: width,
477
491
child: Wrap (
478
- children: _parseNodeList (node.nodes),
492
+ children: < Widget > [
493
+ mark,
494
+ Wrap (children: _parseNodeList (node.nodes))
495
+ ],
479
496
),
480
497
);
481
498
case "main" :
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ homepage: https://github.com/Sub6Resources/flutter_html
6
6
7
7
environment :
8
8
sdk : ' >=1.19.0 <3.0.0'
9
- flutter : ' >=0.5.0 <0.8.0 '
9
+ flutter : ' >=0.5.0'
10
10
11
11
dependencies :
12
12
html : ^0.13.3
You can’t perform that action at this time.
0 commit comments