alphaWithDuration method
执行透明度动画
范围为0-1
Implementation
Future<void> alphaWithDuration({
Duration duration = const Duration(seconds: 1),
double fromValue = 0,
required double toValue,
int repeatCount = 0,
int repeatMode = 0,
}) async {
assert(fromValue >= 0 && fromValue <= 1);
assert(toValue >= 0 && toValue <= 1);
await kMethodChannel.invokeMethod('UIView::alphaWithDuration', {
'__this__': this,
'duration': duration.inMilliseconds / 1000,
'fromValue': fromValue,
'toValue': toValue,
'repeatCount': repeatCount,
'repeatMode': repeatMode,
});
}