@@ -20,7 +20,6 @@ public FadeInImage(
20
20
BoxFit ? fit = null ,
21
21
Alignment alignment = null ,
22
22
ImageRepeat repeat = ImageRepeat . noRepeat ,
23
- bool matchTextDirection = false ,
24
23
Key key = null
25
24
) : base ( key ) {
26
25
D . assert ( placeholder != null ) ;
@@ -41,7 +40,6 @@ public FadeInImage(
41
40
this . fadeInCurve = fadeInCurve ?? Curves . easeIn ;
42
41
this . alignment = alignment ?? Alignment . center ;
43
42
this . repeat = repeat ;
44
- this . matchTextDirection = matchTextDirection ;
45
43
}
46
44
47
45
public static FadeInImage memoryNetwork (
@@ -58,7 +56,6 @@ public static FadeInImage memoryNetwork(
58
56
BoxFit ? fit = null ,
59
57
Alignment alignment = null ,
60
58
ImageRepeat repeat = ImageRepeat . noRepeat ,
61
- bool matchTextDirection = false ,
62
59
Key key = null
63
60
) {
64
61
D . assert ( placeholder != null ) ;
@@ -81,15 +78,15 @@ public static FadeInImage memoryNetwork(
81
78
fit ,
82
79
alignment ,
83
80
repeat ,
84
- matchTextDirection
81
+ key
85
82
) ;
86
83
}
87
84
88
85
public static FadeInImage assetNetwork (
89
86
string placeholder ,
90
87
string image ,
91
88
AssetBundle bundle = null ,
92
- float placeholderScale = 0.0f ,
89
+ float ? placeholderScale = null ,
93
90
float imageScale = 1.0f ,
94
91
TimeSpan ? fadeOutDuration = null ,
95
92
Curve fadeOutCurve = null ,
@@ -100,7 +97,6 @@ public static FadeInImage assetNetwork(
100
97
BoxFit ? fit = null ,
101
98
Alignment alignment = null ,
102
99
ImageRepeat repeat = ImageRepeat . noRepeat ,
103
- bool matchTextDirection = false ,
104
100
Key key = null
105
101
) {
106
102
D . assert ( placeholder != null ) ;
@@ -111,7 +107,7 @@ public static FadeInImage assetNetwork(
111
107
D . assert ( fadeInCurve != null ) ;
112
108
D . assert ( alignment != null ) ;
113
109
var imageProvider = placeholderScale != null
114
- ? new ExactAssetImage ( placeholder , bundle : bundle , scale : placeholderScale )
110
+ ? new ExactAssetImage ( placeholder , bundle : bundle , scale : placeholderScale ?? 1.0f )
115
111
: ( ImageProvider ) new AssetImage ( placeholder , bundle : bundle ) ;
116
112
117
113
var networkImage = new NetworkImage ( image , imageScale ) ;
@@ -126,7 +122,7 @@ public static FadeInImage assetNetwork(
126
122
fit ,
127
123
alignment ,
128
124
repeat ,
129
- matchTextDirection
125
+ key
130
126
) ;
131
127
}
132
128
@@ -141,8 +137,6 @@ public static FadeInImage assetNetwork(
141
137
public readonly BoxFit ? fit ;
142
138
public readonly Alignment alignment ;
143
139
public readonly ImageRepeat repeat ;
144
- public readonly bool matchTextDirection ;
145
-
146
140
147
141
public override State createState ( ) {
148
142
return new _FadeInImageState ( ) ;
@@ -182,7 +176,7 @@ public void resolve(ImageProvider provider) {
182
176
ImageStream oldImageStream = this . _imageStream ;
183
177
Size size = null ;
184
178
if ( this . widget . width != null && this . widget . height != null ) {
185
- size = new Size ( Convert . ToSingle ( this . widget . width ) , Convert . ToSingle ( this . widget . height ) ) ;
179
+ size = new Size ( ( int ) this . widget . width , ( int ) this . widget . height ) ;
186
180
}
187
181
188
182
this . _imageStream = provider . resolve ( ImageUtils . createLocalImageConfiguration ( this . state . context , size ) ) ;
0 commit comments