Added timer icon home header

This commit is contained in:
Juan Gilsanz Polo 2023-05-25 18:30:44 +02:00
parent 2495724ae7
commit de651118f2

View file

@ -40,7 +40,10 @@ class HomeAppBar extends StatelessWidget {
floating: true, floating: true,
centerTitle: false, centerTitle: false,
forceElevated: innerBoxScrolled, forceElevated: innerBoxScrolled,
leading: Icon( leading: Stack(
children: [
Center(
child: Icon(
serversProvider.selectedServer != null && statusProvider.serverStatus != null serversProvider.selectedServer != null && statusProvider.serverStatus != null
? statusProvider.serverStatus!.generalEnabled == true ? statusProvider.serverStatus!.generalEnabled == true
? Icons.gpp_good_rounded ? Icons.gpp_good_rounded
@ -57,6 +60,29 @@ class HomeAppBar extends StatelessWidget {
: Colors.red : Colors.red
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38) : Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
), ),
),
if (statusProvider.remainingTime > 0) Positioned(
bottom: 15,
right: 15,
child: Stack(
children: [
Container(
padding: const EdgeInsets.all(1),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: Theme.of(context).colorScheme.surface
),
child: Icon(
Icons.timer_rounded,
size: 12,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
],
),
)
],
),
title: Column( title: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,