fix: Hide memory metrics card when there are none

This commit is contained in:
Inex Code 2024-07-30 15:32:04 +03:00
parent e065463ffb
commit 751de80840

View file

@ -39,6 +39,7 @@ class _Chart extends StatelessWidget {
), ),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
if (!(state is MetricsLoaded && state.memoryMetrics == null))
FilledCard( FilledCard(
clipped: false, clipped: false,
child: Padding( child: Padding(
@ -77,6 +78,7 @@ class _Chart extends StatelessWidget {
const MemoryUsageByServiceRoute(), const MemoryUsageByServiceRoute(),
); );
}, },
enabled: state is MetricsLoaded,
), ),
], ],
), ),