feat(ui): crossfade skeleton into content on extension detail screens

SkeletonCrossfade (AnimatedSwitcher, 250ms) replaces the single-frame
hard swap when the extension album/artist/playlist fetch completes.
This commit is contained in:
zarzet
2026-07-14 09:09:49 +07:00
parent c580280890
commit 8c33a86df5
2 changed files with 79 additions and 51 deletions
+16
View File
@@ -624,6 +624,22 @@ class HomeSearchSkeleton extends StatelessWidget {
}
}
/// Crossfades when the child's runtime type changes — used to swap a loading
/// skeleton for the loaded screen without a single-frame hard cut.
class SkeletonCrossfade extends StatelessWidget {
final Widget child;
const SkeletonCrossfade({super.key, required this.child});
@override
Widget build(BuildContext context) {
return AnimatedSwitcher(
duration: const Duration(milliseconds: 250),
child: child,
);
}
}
/// An animated selection indicator that scales in/out and crossfades the
/// checked/unchecked state.
class AnimatedSelectionCheckbox extends StatelessWidget {