Skip to content

Commit 376e8e5

Browse files
Diksha-MukherjeeAgarwalmarcnause
authored andcommitted
fix: Reset _currentLux to 0 on sensor change
Ensures the Lux Meter gauge resets instantly when switching between active sensors instead of incorrectly displaying the previous sensor's value.
1 parent e4ae6fa commit 376e8e5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/providers/luxmeter_state_provider.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ class LuxMeterStateProvider extends ChangeNotifier {
468468
_luxMin = 0;
469469
_luxMax = 0;
470470
_currentTime = 0;
471+
_currentLux = 0;
471472
_startTime = DateTime.now().millisecondsSinceEpoch / 1000.0;
472473
notifyListeners();
473474
}

0 commit comments

Comments
 (0)