Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit d35e404

Browse files
author
luoxuuguang
committed
fix: remove matchTextDirection
1 parent ddd1ebb commit d35e404

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

Runtime/widgets/fade_in_image.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public FadeInImage(
2020
BoxFit? fit = null,
2121
Alignment alignment = null,
2222
ImageRepeat repeat = ImageRepeat.noRepeat,
23-
bool matchTextDirection = false,
2423
Key key = null
2524
) : base(key) {
2625
D.assert(placeholder != null);
@@ -41,7 +40,6 @@ public FadeInImage(
4140
this.fadeInCurve = fadeInCurve ?? Curves.easeIn;
4241
this.alignment = alignment ?? Alignment.center;
4342
this.repeat = repeat;
44-
this.matchTextDirection = matchTextDirection;
4543
}
4644

4745
public static FadeInImage memoryNetwork(
@@ -58,7 +56,6 @@ public static FadeInImage memoryNetwork(
5856
BoxFit? fit = null,
5957
Alignment alignment = null,
6058
ImageRepeat repeat = ImageRepeat.noRepeat,
61-
bool matchTextDirection = false,
6259
Key key = null
6360
) {
6461
D.assert(placeholder != null);
@@ -81,15 +78,15 @@ public static FadeInImage memoryNetwork(
8178
fit,
8279
alignment,
8380
repeat,
84-
matchTextDirection
81+
key
8582
);
8683
}
8784

8885
public static FadeInImage assetNetwork(
8986
string placeholder,
9087
string image,
9188
AssetBundle bundle = null,
92-
float placeholderScale = 0.0f,
89+
float? placeholderScale = null,
9390
float imageScale = 1.0f,
9491
TimeSpan? fadeOutDuration = null,
9592
Curve fadeOutCurve = null,
@@ -100,7 +97,6 @@ public static FadeInImage assetNetwork(
10097
BoxFit? fit = null,
10198
Alignment alignment = null,
10299
ImageRepeat repeat = ImageRepeat.noRepeat,
103-
bool matchTextDirection = false,
104100
Key key = null
105101
) {
106102
D.assert(placeholder != null);
@@ -111,7 +107,7 @@ public static FadeInImage assetNetwork(
111107
D.assert(fadeInCurve != null);
112108
D.assert(alignment != null);
113109
var imageProvider = placeholderScale != null
114-
? new ExactAssetImage(placeholder, bundle: bundle, scale: placeholderScale)
110+
? new ExactAssetImage(placeholder, bundle: bundle, scale: placeholderScale ?? 1.0f)
115111
: (ImageProvider) new AssetImage(placeholder, bundle: bundle);
116112

117113
var networkImage = new NetworkImage(image, imageScale);
@@ -126,7 +122,7 @@ public static FadeInImage assetNetwork(
126122
fit,
127123
alignment,
128124
repeat,
129-
matchTextDirection
125+
key
130126
);
131127
}
132128

@@ -141,8 +137,6 @@ public static FadeInImage assetNetwork(
141137
public readonly BoxFit? fit;
142138
public readonly Alignment alignment;
143139
public readonly ImageRepeat repeat;
144-
public readonly bool matchTextDirection;
145-
146140

147141
public override State createState() {
148142
return new _FadeInImageState();
@@ -182,7 +176,7 @@ public void resolve(ImageProvider provider) {
182176
ImageStream oldImageStream = this._imageStream;
183177
Size size = null;
184178
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);
186180
}
187181

188182
this._imageStream = provider.resolve(ImageUtils.createLocalImageConfiguration(this.state.context, size));

0 commit comments

Comments
 (0)