Added screen to update server

This commit is contained in:
Juan Gilsanz Polo 2023-04-06 22:56:32 +02:00
parent 4e65f80baf
commit e02b598be9
13 changed files with 819 additions and 34 deletions

View file

@ -50,11 +50,33 @@ class BottomNavBar extends StatelessWidget {
return NavigationBar(
selectedIndex: appConfigProvider.selectedScreen,
destinations: screens.map((screen) => NavigationDestination(
icon: Icon(
screen.icon,
color: screens[appConfigProvider.selectedScreen] == screen
? Theme.of(context).colorScheme.onSecondaryContainer
: Theme.of(context).colorScheme.onSurfaceVariant,
icon: Stack(
children: [
Icon(
screen.icon,
color: screens[appConfigProvider.selectedScreen] == screen
? Theme.of(context).colorScheme.onSecondaryContainer
: Theme.of(context).colorScheme.onSurfaceVariant,
),
if (
screen.name == 'settings' &&
serversProvider.updateAvailable.data != null &&
serversProvider.updateAvailable.data!.updateAvailable != null &&
serversProvider.updateAvailable.data!.updateAvailable == true
) Positioned(
bottom: 0,
right: -12,
child: Container(
width: 10,
height: 10,
margin: const EdgeInsets.only(right: 12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.red
),
),
)
],
),
label: translatedName(screen.name)
)).toList(),