opt: 播放器控制栏动画

This commit is contained in:
guozhigq
2024-03-02 00:40:53 +08:00
parent fce701090a
commit f815affff9

View File

@ -19,11 +19,11 @@ class AppBarAni extends StatelessWidget implements PreferredSizeWidget {
@override
Widget build(BuildContext context) {
visible ? controller.reverse() : controller.forward();
visible ? controller.forward() : controller.reverse();
return SlideTransition(
position: Tween<Offset>(
begin: Offset.zero,
end: Offset(0, position! == 'top' ? -1 : 1),
begin: Offset(0, position! == 'top' ? -1 : 1),
end: Offset.zero,
).animate(CurvedAnimation(
parent: controller,
curve: Curves.linear,