removed a force unwrap from OccupancyHeatMap._maxValue to avoid any bugs.

This commit is contained in:
Faris Armoush
2025-05-14 10:48:28 +03:00
parent 46815585cb
commit c1dab3400b

View File

@ -15,7 +15,7 @@ class OccupancyHeatMap extends StatelessWidget {
static const _totalWeeks = 53;
int get _maxValue => heatMapData.isNotEmpty
? heatMapData.keys.map((key) => heatMapData[key]!).reduce(math.max)
? heatMapData.keys.map((key) => heatMapData[key] ?? 0).reduce(math.max)
: 0;
DateTime _getStartingDate() {