mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
Created decorators for energy management charts to divide values by 100, and modified the intervals.
This commit is contained in:
8
lib/utils/helpers/safe_division_helper.dart
Normal file
8
lib/utils/helpers/safe_division_helper.dart
Normal file
@ -0,0 +1,8 @@
|
||||
abstract final class SafeDivisionHelper {
|
||||
const SafeDivisionHelper._();
|
||||
|
||||
static double divide(num value, num divider) {
|
||||
if (divider == 0) return 0;
|
||||
return value / divider;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user