opt: 播放器控制栏动画
This commit is contained in:
@ -19,11 +19,11 @@ class AppBarAni extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
visible ? controller.reverse() : controller.forward();
|
visible ? controller.forward() : controller.reverse();
|
||||||
return SlideTransition(
|
return SlideTransition(
|
||||||
position: Tween<Offset>(
|
position: Tween<Offset>(
|
||||||
begin: Offset.zero,
|
begin: Offset(0, position! == 'top' ? -1 : 1),
|
||||||
end: Offset(0, position! == 'top' ? -1 : 1),
|
end: Offset.zero,
|
||||||
).animate(CurvedAnimation(
|
).animate(CurvedAnimation(
|
||||||
parent: controller,
|
parent: controller,
|
||||||
curve: Curves.linear,
|
curve: Curves.linear,
|
||||||
|
Reference in New Issue
Block a user