@@ -13,12 +13,12 @@ import 'package:flutter_html/src/anchor.dart';
13
13
import 'package:flutter_html/src/css_parser.dart' ;
14
14
import 'package:flutter_html/src/html_elements.dart' ;
15
15
import 'package:flutter_html/src/layout_element.dart' ;
16
+ import 'package:flutter_html/src/navigation_delegate.dart' ;
16
17
import 'package:flutter_html/src/utils.dart' ;
17
18
import 'package:flutter_html/style.dart' ;
18
19
import 'package:html/dom.dart' as dom;
19
20
import 'package:html/parser.dart' as htmlparser;
20
21
import 'package:numerus/numerus.dart' ;
21
- import 'package:webview_flutter/webview_flutter.dart' ;
22
22
23
23
typedef OnTap = void Function (
24
24
String ? url,
@@ -61,6 +61,8 @@ class HtmlParser extends StatelessWidget {
61
61
final TextSelectionControls ? selectionControls;
62
62
final ScrollPhysics ? scrollPhysics;
63
63
64
+ final Map <String , Size > cachedImageSizes = {};
65
+
64
66
HtmlParser ({
65
67
required this .key,
66
68
required this .htmlData,
@@ -401,9 +403,11 @@ class HtmlParser extends StatelessWidget {
401
403
);
402
404
} else if (tree.style.display == Display .LIST_ITEM ) {
403
405
List <InlineSpan > getChildren (StyledElement tree) {
404
- InlineSpan tabSpan = WidgetSpan (child: Text ("\t " , textAlign: TextAlign .right));
405
406
List <InlineSpan > children = tree.children.map ((tree) => parseTree (newContext, tree)).toList ();
406
407
if (tree.style.listStylePosition == ListStylePosition .INSIDE ) {
408
+ final tabSpan = WidgetSpan (
409
+ child: Text ("\t " , textAlign: TextAlign .right, style: TextStyle (fontWeight: FontWeight .w400)),
410
+ );
407
411
children.insert (0 , tabSpan);
408
412
}
409
413
return children;
@@ -425,7 +429,7 @@ class HtmlParser extends StatelessWidget {
425
429
padding: tree.style.padding ?? EdgeInsets .only (left: tree.style.direction != TextDirection .rtl ? 10.0 : 0.0 , right: tree.style.direction == TextDirection .rtl ? 10.0 : 0.0 ),
426
430
child: newContext.style.markerContent
427
431
) : Container (height: 0 , width: 0 ),
428
- Text ("\t " , textAlign: TextAlign .right),
432
+ Text ("\t " , textAlign: TextAlign .right, style : TextStyle (fontWeight : FontWeight .w400) ),
429
433
Expanded (
430
434
child: Padding (
431
435
padding: tree.style.listStylePosition == ListStylePosition .INSIDE ?
@@ -737,7 +741,6 @@ class HtmlParser extends StatelessWidget {
737
741
String marker = "" ;
738
742
switch (tree.style.listStyleType! ) {
739
743
case ListStyleType .NONE :
740
- tree.style.markerContent = '' ;
741
744
break ;
742
745
case ListStyleType .CIRCLE :
743
746
marker = '○' ;
@@ -1054,7 +1057,7 @@ class ContainerSpan extends StatelessWidget {
1054
1057
height: style.height,
1055
1058
width: style.width,
1056
1059
padding: style.padding,
1057
- margin: style.margin,
1060
+ margin: style.margin? . clamp ( EdgeInsets .zero, const EdgeInsets . all ( double .infinity)) ,
1058
1061
alignment: shrinkWrap ? null : style.alignment,
1059
1062
child: child ??
1060
1063
StyledText (
0 commit comments