refactor: improve formatting of clamp method for near and far detection values

This commit is contained in:
Faris Armoush
2025-04-27 10:55:03 +03:00
parent b26928b3d5
commit 233fb2ee2c

View File

@ -113,8 +113,10 @@ class FlushMountedPresenceSensorControlView extends StatelessWidget
),
),
PresenceUpdateData(
value:
((model.nearDetection / 100).toDouble()).clamp(0.0, double.infinity),
value: (model.nearDetection / 100).clamp(
0.0,
double.infinity,
),
title: 'Nearest Detect Dist:',
description: 'm',
minValue: 0.0,
@ -130,7 +132,7 @@ class FlushMountedPresenceSensorControlView extends StatelessWidget
),
),
PresenceUpdateData(
value: ((model.farDetection / 100).toDouble()).clamp(0.0, double.infinity),
value: (model.farDetection / 100).clamp(0.0, double.infinity),
title: 'Max Detect Dist:',
description: 'm',
minValue: 0.0,