We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 243fcb4 commit 29c4f90Copy full SHA for 29c4f90
sensors_dashboard/lib/view_model/sensors_screen_viewmodel.dart
@@ -5,22 +5,9 @@ import 'package:sensors_dashboard/model/repository/sensors_repository.dart';
5
6
class SensorsScreenViewmodel with ChangeNotifier{
7
8
- List<Sensor> _sensors = [];
9
- List<Sensor> get sensors => _sensors;
10
-
11
final SensorsRepository sensorsRepository;
12
SensorsScreenViewmodel({required this.sensorsRepository});
13
14
- void fetchSensors(){
15
16
- if(kReleaseMode) {
17
- sensorsRepository.getSensors().then((sensors) {
18
- _sensors = sensors;
19
- });
20
- }
21
22
23
24
Future<List<Sensor>> getSensors() => sensorsRepository.getSensors();
25
26
0 commit comments