This commit is contained in:
Faris Armoush
2025-04-17 16:55:44 +03:00
parent a8430a7d3d
commit e45f57ca03
6 changed files with 6 additions and 6 deletions

View File

@ -225,7 +225,7 @@ class DraggableCard extends StatelessWidget {
if (function.functionCode == 'temp_set' || function.functionCode == 'temp_current') { if (function.functionCode == 'temp_set' || function.functionCode == 'temp_current') {
return '${(function.value / 10).toStringAsFixed(0)}°C'; return '${(function.value / 10).toStringAsFixed(0)}°C';
} else if (function.functionCode.contains('countdown')) { } else if (function.functionCode.contains('countdown')) {
final seconds = function.value.toInt(); final seconds = function.value?.toInt() ?? 0;
if (seconds >= 3600) { if (seconds >= 3600) {
final hours = (seconds / 3600).floor(); final hours = (seconds / 3600).floor();
final remainingMinutes = ((seconds % 3600) / 60).floor(); final remainingMinutes = ((seconds % 3600) / 60).floor();

View File

@ -287,7 +287,7 @@ class ACHelper {
functionCode: selectCode, functionCode: selectCode,
operationName: operationName, operationName: operationName,
condition: conditions[index], condition: conditions[index],
value: selectedFunctionData?.value, value: selectedFunctionData?.value ?? 0.0,
valueDescription: selectedFunctionData?.valueDescription, valueDescription: selectedFunctionData?.valueDescription,
), ),
), ),

View File

@ -46,7 +46,7 @@ class CpsDialogSliderSelector extends StatelessWidget {
functionCode: selectedFunction, functionCode: selectedFunction,
operationName: operationName, operationName: operationName,
condition: condition, condition: condition,
value: selectedFunctionData.value, value: selectedFunctionData.value ?? 0,
), ),
), ),
), ),

View File

@ -250,7 +250,7 @@ class OneGangSwitchHelper {
functionCode: selectCode, functionCode: selectCode,
operationName: operationName, operationName: operationName,
condition: conditions[index], condition: conditions[index],
value: selectedFunctionData?.value, value: selectedFunctionData?.value ?? 0.0,
valueDescription: selectedFunctionData?.valueDescription, valueDescription: selectedFunctionData?.valueDescription,
), ),
), ),

View File

@ -250,7 +250,7 @@ class TwoGangSwitchHelper {
functionCode: selectCode, functionCode: selectCode,
operationName: operationName, operationName: operationName,
condition: conditions[index], condition: conditions[index],
value: selectedFunctionData?.value, value: selectedFunctionData?.value ?? 0.0,
valueDescription: selectedFunctionData?.valueDescription, valueDescription: selectedFunctionData?.valueDescription,
), ),
), ),

View File

@ -44,7 +44,7 @@ class WpsValueSelectorWidget extends StatelessWidget {
functionCode: selectedFunction, functionCode: selectedFunction,
operationName: functionData.operationName, operationName: functionData.operationName,
condition: condition, condition: condition,
value: functionData.value, value: functionData.value ?? 0.0,
), ),
), ),
), ),