mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
@@ -24,6 +24,7 @@ mixin TripleMixin on GetxController, TickerProvider {
|
||||
|
||||
// no need for pugv
|
||||
AnimationController? _tripleAnimCtr;
|
||||
CurvedAnimation? _curvedAnimation;
|
||||
Animation<double>? _tripleAnimation;
|
||||
|
||||
AnimationController get tripleAnimCtr =>
|
||||
@@ -33,10 +34,15 @@ mixin TripleMixin on GetxController, TickerProvider {
|
||||
reverseDuration: const Duration(milliseconds: 400),
|
||||
);
|
||||
|
||||
CurvedAnimation get curvedAnimation => _curvedAnimation ??= CurvedAnimation(
|
||||
parent: tripleAnimCtr,
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
|
||||
Animation<double> get tripleAnimation => _tripleAnimation ??= Tween<double>(
|
||||
begin: 0,
|
||||
end: -2 * pi,
|
||||
).animate(CurvedAnimation(parent: tripleAnimCtr, curve: Curves.easeInOut));
|
||||
).animate(curvedAnimation);
|
||||
|
||||
Timer? _timer;
|
||||
|
||||
@@ -78,6 +84,7 @@ mixin TripleMixin on GetxController, TickerProvider {
|
||||
@override
|
||||
void onClose() {
|
||||
_cancelTimer();
|
||||
_curvedAnimation?.dispose();
|
||||
_tripleAnimCtr?.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user