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(
|
return AnimatedBuilder(
|
||||||
animation: animation,
|
animation: animation,
|
||||||
child: child,
|
child: useMemoized(() => child, [child]),
|
||||||
builder: (BuildContext context, Widget? child) {
|
builder: (BuildContext context, Widget? child) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -82,7 +82,7 @@ class PlayerView extends HookConsumerWidget {
|
|||||||
primaryEnd: Alignment.bottomLeft,
|
primaryEnd: Alignment.bottomLeft,
|
||||||
secondaryBegin: Alignment.bottomRight,
|
secondaryBegin: Alignment.bottomRight,
|
||||||
secondaryEnd: Alignment.topRight,
|
secondaryEnd: Alignment.topRight,
|
||||||
duration: const Duration(seconds: 25),
|
duration: const Duration(seconds: 15),
|
||||||
primaryColors: [
|
primaryColors: [
|
||||||
palette.dominantColor?.color ?? theme.colorScheme.primary,
|
palette.dominantColor?.color ?? theme.colorScheme.primary,
|
||||||
palette.mutedColor?.color ?? theme.colorScheme.secondary,
|
palette.mutedColor?.color ?? theme.colorScheme.secondary,
|
||||||
|
Loading…
Reference in New Issue
Block a user