File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11## [ 0.11.0] - September 6, 2019:
22
33* Make it so ` width=100% ` doesn't throw error. Fixes [ #118 ] ( https://github.com/Sub6Resources/flutter_html/issues/118 ) .
4+ * You can now set width and/or height in ` ImageProperties ` to negative to ignore the ` width ` and/or ` height ` values from the html.
45
56## [ 0.10.4] - June 22, 2019:
67
Original file line number Diff line number Diff line change @@ -759,8 +759,8 @@ class HtmlRichTextParser extends StatelessWidget {
759759 child: Image .memory (
760760 base64.decode (
761761 node.attributes['src' ].split ("base64," )[1 ].trim ()),
762- width: width,
763- height: height,
762+ width: ( width ?? - 1 ) > 0 ? width : null ,
763+ height: ( height ?? - 1 ) > 0 ? width : null ,
764764 scale: imageProperties? .scale ?? 1.0 ,
765765 matchTextDirection:
766766 imageProperties? .matchTextDirection ?? false ,
@@ -793,8 +793,8 @@ class HtmlRichTextParser extends StatelessWidget {
793793 parseContext.rootWidgetList.add (GestureDetector (
794794 child: Image .network (
795795 node.attributes['src' ],
796- width: width,
797- height: height,
796+ width: ( width ?? - 1 ) > 0 ? width : null ,
797+ height: ( height ?? - 1 ) > 0 ? height : null ,
798798 scale: imageProperties? .scale ?? 1.0 ,
799799 matchTextDirection:
800800 imageProperties? .matchTextDirection ?? false ,
You can’t perform that action at this time.
0 commit comments