mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
refactor: improve formatting of clamp method for near and far detection values
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user