use fvm & change tween

master
小赖 4 years ago
parent 49d7319a4b
commit bcc08f5498

@ -0,0 +1 @@
/Users/akufe/fvm/versions/2.0.0

@ -0,0 +1,3 @@
{
"flutterSdkVersion": "2.0.0"
}

@ -0,0 +1,3 @@
{
"dart.flutterSdkPath": "/Users/akufe/fvm/versions/2.0.0"
}

@ -28,7 +28,6 @@ class _AnimatedRoateState extends AnimatedWidgetBaseState<AnimatedRotate> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// return AnimatedOpacity()
return Transform.rotate( return Transform.rotate(
angle: _rotateTween?.evaluate(animation) ?? 0, angle: _rotateTween?.evaluate(animation) ?? 0,
child: widget.child, child: widget.child,
@ -38,9 +37,9 @@ class _AnimatedRoateState extends AnimatedWidgetBaseState<AnimatedRotate> {
@override @override
void forEachTween(visitor) { void forEachTween(visitor) {
_rotateTween = visitor( _rotateTween = visitor(
_rotateTween, _rotateTween!,
widget.angle, widget.angle,
(dynamic value) => Tween<double>(begin: value), (dynamic value) => Tween<double>(begin: value as double),
) as Tween<double>?; ) as Tween<double>?;
} }
} }

Loading…
Cancel
Save