mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
fix: memoize child of animated widget and make player bg animation faster
This commit is contained in:
parent
49b5d0e694
commit
fcb5c8f8da
@ -105,7 +105,7 @@ class AnimateGradient extends HookWidget {
|
||||
|
||||
return AnimatedBuilder(
|
||||
animation: animation,
|
||||
child: child,
|
||||
child: useMemoized(() => child, [child]),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
|
@ -82,7 +82,7 @@ class PlayerView extends HookConsumerWidget {
|
||||
primaryEnd: Alignment.bottomLeft,
|
||||
secondaryBegin: Alignment.bottomRight,
|
||||
secondaryEnd: Alignment.topRight,
|
||||
duration: const Duration(seconds: 25),
|
||||
duration: const Duration(seconds: 15),
|
||||
primaryColors: [
|
||||
palette.dominantColor?.color ?? theme.colorScheme.primary,
|
||||
palette.mutedColor?.color ?? theme.colorScheme.secondary,
|
||||
|
Loading…
Reference in New Issue
Block a user