From bcc08f54986f104a71c5deb4aad62eca14a65468 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Fri, 5 Mar 2021 11:07:17 +0800 Subject: [PATCH] use fvm & change tween --- .fvm/flutter_sdk | 1 + .fvm/fvm_config.json | 3 +++ .vscode/settings.json | 3 +++ lib/src/animated_rotate.dart | 5 ++--- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 120000 .fvm/flutter_sdk create mode 100644 .fvm/fvm_config.json create mode 100644 .vscode/settings.json diff --git a/.fvm/flutter_sdk b/.fvm/flutter_sdk new file mode 120000 index 0000000..b01ff9a --- /dev/null +++ b/.fvm/flutter_sdk @@ -0,0 +1 @@ +/Users/akufe/fvm/versions/2.0.0 \ No newline at end of file diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json new file mode 100644 index 0000000..309af34 --- /dev/null +++ b/.fvm/fvm_config.json @@ -0,0 +1,3 @@ +{ + "flutterSdkVersion": "2.0.0" +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c6471a7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": "/Users/akufe/fvm/versions/2.0.0" +} \ No newline at end of file diff --git a/lib/src/animated_rotate.dart b/lib/src/animated_rotate.dart index e907b10..ec51dab 100644 --- a/lib/src/animated_rotate.dart +++ b/lib/src/animated_rotate.dart @@ -28,7 +28,6 @@ class _AnimatedRoateState extends AnimatedWidgetBaseState { @override Widget build(BuildContext context) { - // return AnimatedOpacity() return Transform.rotate( angle: _rotateTween?.evaluate(animation) ?? 0, child: widget.child, @@ -38,9 +37,9 @@ class _AnimatedRoateState extends AnimatedWidgetBaseState { @override void forEachTween(visitor) { _rotateTween = visitor( - _rotateTween, + _rotateTween!, widget.angle, - (dynamic value) => Tween(begin: value), + (dynamic value) => Tween(begin: value as double), ) as Tween?; } }