@@ -27,7 +27,7 @@ class Html extends StatelessWidget {
27
27
decoration: TextDecoration .underline,
28
28
color: Colors .blueAccent,
29
29
decorationColor: Colors .blueAccent),
30
- this .shrinkToFit = false ,
30
+ this .shrinkWrap = false ,
31
31
@deprecated this .imageProperties,
32
32
this .onImageTap,
33
33
@deprecated this .showImages = true ,
@@ -46,7 +46,7 @@ class Html extends StatelessWidget {
46
46
final bool useRichText;
47
47
final ImageErrorListener onImageError;
48
48
final TextStyle linkStyle;
49
- final bool shrinkToFit ;
49
+ final bool shrinkWrap ;
50
50
51
51
/// Properties for the Image widget that gets rendered by the rich text parser
52
52
final ImageProperties imageProperties;
@@ -67,7 +67,7 @@ class Html extends StatelessWidget {
67
67
68
68
@override
69
69
Widget build (BuildContext context) {
70
- final double width = shrinkToFit ? null : MediaQuery .of (context).size.width;
70
+ final double width = shrinkWrap ? null : MediaQuery .of (context).size.width;
71
71
72
72
if (useRichText) {
73
73
return Container (
@@ -77,7 +77,7 @@ class Html extends StatelessWidget {
77
77
child: DefaultTextStyle .merge (
78
78
style: defaultTextStyle ?? Theme .of (context).textTheme.body1,
79
79
child: HtmlRichTextParser (
80
- shrinkToFit: shrinkToFit ,
80
+ shrinkToFit: shrinkWrap ,
81
81
onLinkTap: onLinkTap,
82
82
renderNewlines: renderNewlines,
83
83
customEdgeInsets: customEdgeInsets,
@@ -103,6 +103,7 @@ class Html extends StatelessWidget {
103
103
onLinkTap: onLinkTap,
104
104
onImageTap: onImageTap,
105
105
onImageError: onImageError,
106
+ shrinkWrap: shrinkWrap,
106
107
style: style,
107
108
customRender: customRender,
108
109
blacklistedElements: blacklistedElements,
0 commit comments