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 1
1
## [ 0.11.0] - September 6, 2019:
2
2
3
3
* 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.
4
5
5
6
## [ 0.10.4] - June 22, 2019:
6
7
Original file line number Diff line number Diff line change @@ -759,8 +759,8 @@ class HtmlRichTextParser extends StatelessWidget {
759
759
child: Image .memory (
760
760
base64.decode (
761
761
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 ,
764
764
scale: imageProperties? .scale ?? 1.0 ,
765
765
matchTextDirection:
766
766
imageProperties? .matchTextDirection ?? false ,
@@ -793,8 +793,8 @@ class HtmlRichTextParser extends StatelessWidget {
793
793
parseContext.rootWidgetList.add (GestureDetector (
794
794
child: Image .network (
795
795
node.attributes['src' ],
796
- width: width,
797
- height: height,
796
+ width: ( width ?? - 1 ) > 0 ? width : null ,
797
+ height: ( height ?? - 1 ) > 0 ? height : null ,
798
798
scale: imageProperties? .scale ?? 1.0 ,
799
799
matchTextDirection:
800
800
imageProperties? .matchTextDirection ?? false ,
You can’t perform that action at this time.
0 commit comments