File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -163,16 +163,20 @@ DoubleCallBack<double> createInterpolation(InterpolationConfigType config) {
163163
164164 ExtrapolateType extrapolateRight = config.extrapolateRight;
165165 if (config.extrapolate != null ) extrapolateRight = config.extrapolate;
166-
166+ ///
167+ /// 由于flutter中Curve.transform使用assert限制在0-1之间
168+ /// 所以其ExtrapolateType固定设置为clamp,此处于React Native
169+ /// 中不同
170+ ///
167171 return interpolate (
168172 input: input,
169173 inputMin: config.inputRange[range],
170174 inputMax: config.inputRange[range + 1 ],
171175 outputMin: config.outputRange[range],
172176 outputMax: config.outputRange[range + 1 ],
173177 curve: config.curve,
174- extrapolateLeft: extrapolateLeft ,
175- extrapolateRight: extrapolateRight ,
178+ extrapolateLeft: ExtrapolateType .clamp ,
179+ extrapolateRight: ExtrapolateType .clamp ,
176180 );
177181 };
178182}
You can’t perform that action at this time.
0 commit comments