mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
AppDrawerHeader _CurrentRepo: clean up
This commit is contained in:
@ -91,7 +91,6 @@ class _CurrentRepo extends StatefulWidget {
|
|||||||
|
|
||||||
class __CurrentRepoState extends State<_CurrentRepo>
|
class __CurrentRepoState extends State<_CurrentRepo>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
Animation animation;
|
|
||||||
AnimationController controller;
|
AnimationController controller;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -101,6 +100,12 @@ class __CurrentRepoState extends State<_CurrentRepo>
|
|||||||
controller = AnimationController(duration: 250.milliseconds, vsync: this);
|
controller = AnimationController(duration: 250.milliseconds, vsync: this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
controller.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var textTheme = Theme.of(context).textTheme;
|
var textTheme = Theme.of(context).textTheme;
|
||||||
@ -137,7 +142,7 @@ class __CurrentRepoState extends State<_CurrentRepo>
|
|||||||
|
|
||||||
void _pressed() {
|
void _pressed() {
|
||||||
if (controller.isCompleted) {
|
if (controller.isCompleted) {
|
||||||
controller.reverse();
|
controller.reverse(from: 0.0);
|
||||||
} else {
|
} else {
|
||||||
controller.forward(from: 0.0);
|
controller.forward(from: 0.0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user