Added loading indicator

This commit is contained in:
Juan Gilsanz Polo 2024-02-21 13:14:36 +01:00
parent e603814d42
commit 693e66e125

View file

@ -250,13 +250,20 @@ class _Header extends SliverPersistentHeaderDelegate {
left: (constraints.maxWidth/2)-(_iconSize/2), left: (constraints.maxWidth/2)-(_iconSize/2),
child: Opacity( child: Opacity(
opacity: 1-iconPercentage, opacity: 1-iconPercentage,
child: Icon( child: serversProvider.updateAvailable.loadStatus == LoadStatus.loading
serversProvider.updateAvailable.data!.canAutoupdate == true ? const Column(
? Icons.system_update_rounded children: [
: Icons.system_security_update_good_rounded, CircularProgressIndicator(),
size: _iconSize, SizedBox(height: 4)
color: Theme.of(context).colorScheme.primary, ],
), )
: Icon(
serversProvider.updateAvailable.data!.canAutoupdate == true
? Icons.system_update_rounded
: Icons.system_security_update_good_rounded,
size: _iconSize,
color: Theme.of(context).colorScheme.primary,
),
), ),
), ),
Positioned( Positioned(