Skip to content

Commit

Permalink
fix: memoize child of animated widget and make player bg animation fa…
Browse files Browse the repository at this point in the history
…ster
  • Loading branch information
KRTirtho committed Apr 7, 2023
1 parent 49b5d0e commit fcb5c8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/components/shared/animated_gradient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/player/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fcb5c8f

Please sign in to comment.