mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
removed a force unwrap from OccupancyHeatMap._maxValue
to avoid any bugs.
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user