@@ -573,9 +573,10 @@ class HtmlRichTextParser extends StatelessWidget {
573
573
break ;
574
574
case "img" :
575
575
if (node.attributes['src' ] != null ) {
576
- if (node.attributes['src' ].startsWith ("data:image" ) && node.attributes['src' ].contains ("base64," )) {
577
- parseContext.rootWidgetList
578
- .add (Image .memory (base64.decode (node.attributes['src' ].split ("base64," )[1 ].trim ())));
576
+ if (node.attributes['src' ].startsWith ("data:image" ) &&
577
+ node.attributes['src' ].contains ("base64," )) {
578
+ parseContext.rootWidgetList.add (Image .memory (base64.decode (
579
+ node.attributes['src' ].split ("base64," )[1 ].trim ())));
579
580
} else {
580
581
parseContext.rootWidgetList
581
582
.add (Image .network (node.attributes['src' ]));
@@ -1243,8 +1244,10 @@ class HtmlOldParser extends StatelessWidget {
1243
1244
);
1244
1245
case "img" :
1245
1246
if (node.attributes['src' ] != null ) {
1246
- if (node.attributes['src' ].startsWith ("data:image" ) && node.attributes['src' ].contains ("base64," )) {
1247
- return Image .memory (base64.decode (node.attributes['src' ].split ("base64," )[1 ].trim ()));
1247
+ if (node.attributes['src' ].startsWith ("data:image" ) &&
1248
+ node.attributes['src' ].contains ("base64," )) {
1249
+ return Image .memory (base64
1250
+ .decode (node.attributes['src' ].split ("base64," )[1 ].trim ()));
1248
1251
}
1249
1252
return Image .network (node.attributes['src' ]);
1250
1253
} else if (node.attributes['alt' ] != null ) {
0 commit comments