opt triple mixin

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-09 19:25:21 +08:00
parent 30aa29598b
commit 11c6745fd7
4 changed files with 6 additions and 18 deletions

View File

@@ -64,13 +64,6 @@ class _PgcIntroPageState extends State<PgcIntroPage>
super.initState();
pgcIntroController = Get.put(PgcIntroController(), tag: widget.heroTag);
videoDetailCtr = Get.find<VideoDetailController>(tag: widget.heroTag);
initTriple();
}
@override
void dispose() {
disposeTriple();
super.dispose();
}
@override

View File

@@ -67,13 +67,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel>
void initState() {
super.initState();
ugcIntroController = Get.put(UgcIntroController(), tag: widget.heroTag);
initTriple();
}
@override
void dispose() {
disposeTriple();
super.dispose();
}
@override

View File

@@ -18,7 +18,9 @@ mixin TripleAnimMixin<T extends StatefulWidget>
void onTriple();
void onLike();
void initTriple() {
@override
void initState() {
super.initState();
animController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 1500),
@@ -69,9 +71,11 @@ mixin TripleAnimMixin<T extends StatefulWidget>
_timer = null;
}
void disposeTriple() {
@override
void dispose() {
cancelTimer();
animController.dispose();
super.dispose();
}
}

View File

@@ -89,13 +89,11 @@ class HeaderControlState extends State<HeaderControl>
} else {
pgcIntroController = Get.find<PgcIntroController>(tag: heroTag);
}
initTriple();
}
@override
void dispose() {
clock?.cancel();
disposeTriple();
super.dispose();
}