mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
opt video appbar
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -4,23 +4,20 @@ class AppBarAni extends StatelessWidget {
|
||||
const AppBarAni({
|
||||
required this.child,
|
||||
required this.controller,
|
||||
required this.visible,
|
||||
this.position,
|
||||
required this.isTop,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final AnimationController controller;
|
||||
final bool visible;
|
||||
final String? position;
|
||||
final bool isTop;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
visible ? controller.forward() : controller.reverse();
|
||||
return SlideTransition(
|
||||
position:
|
||||
Tween<Offset>(
|
||||
begin: Offset(0, position! == 'top' ? -1 : 1.1),
|
||||
begin: isTop ? const Offset(0, -1) : const Offset(0, 1.1),
|
||||
end: Offset.zero,
|
||||
).animate(
|
||||
CurvedAnimation(
|
||||
@@ -30,7 +27,7 @@ class AppBarAni extends StatelessWidget {
|
||||
),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: position! == 'top'
|
||||
gradient: isTop
|
||||
? const LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
|
||||
Reference in New Issue
Block a user