File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -472,13 +472,25 @@ 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: Row (
478
492
children: < Widget > [
479
- Container (
480
- child: Text ('•' ),
481
- padding: EdgeInsets .symmetric (horizontal: 4.0 )),
493
+ mark,
482
494
Wrap (children: _parseNodeList (node.nodes))
483
495
],
484
496
),
You can’t perform that action at this time.
0 commit comments