@@ -630,8 +630,14 @@ class HtmlRichTextParser extends StatelessWidget {
630
630
parseContext.rootWidgetList.add (GestureDetector (
631
631
child: Image .memory (
632
632
base64.decode (node.attributes['src' ].split ("base64," )[1 ].trim ()),
633
- width: imageProperties? .width,
634
- height: imageProperties? .height,
633
+ width: imageProperties? .width ??
634
+ ((node.attributes['width' ] != null )
635
+ ? double .parse (node.attributes['width' ])
636
+ : null ),
637
+ height: imageProperties? .height ??
638
+ ((node.attributes['height' ] != null )
639
+ ? double .parse (node.attributes['height' ])
640
+ : null ),
635
641
scale: imageProperties? .scale ?? 1.0 ,
636
642
matchTextDirection: imageProperties? .matchTextDirection ?? false ,
637
643
centerSlice: imageProperties? .centerSlice,
@@ -655,8 +661,14 @@ class HtmlRichTextParser extends StatelessWidget {
655
661
parseContext.rootWidgetList.add (GestureDetector (
656
662
child: Image .network (
657
663
node.attributes['src' ],
658
- width: imageProperties? .width,
659
- height: imageProperties? .height,
664
+ width: imageProperties? .width ??
665
+ ((node.attributes['width' ] != null )
666
+ ? double .parse (node.attributes['width' ])
667
+ : null ),
668
+ height: imageProperties? .height ??
669
+ ((node.attributes['height' ] != null )
670
+ ? double .parse (node.attributes['height' ])
671
+ : null ),
660
672
scale: imageProperties? .scale ?? 1.0 ,
661
673
matchTextDirection: imageProperties? .matchTextDirection ?? false ,
662
674
centerSlice: imageProperties? .centerSlice,
0 commit comments