mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-24 02:20:59 +02:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user