From 64281c4809c17b6a32bd5ed16c99999d4c875063 Mon Sep 17 00:00:00 2001 From: Vadim Date: Sat, 1 Apr 2023 21:37:42 +0300 Subject: [PATCH] get ISO and ND from equipment profile --- .../camera_container/provider_container_camera.dart | 3 --- .../camera_container/widget_container_camera.dart | 6 ------ .../provider_container_light_sensor.dart | 3 --- .../widget_container_light_sensor.dart | 6 ------ .../readings_container/widget_container_readings.dart | 8 ++------ 5 files changed, 2 insertions(+), 24 deletions(-) diff --git a/lib/screens/metering/components/camera_container/provider_container_camera.dart b/lib/screens/metering/components/camera_container/provider_container_camera.dart index 82957e1..feac2fd 100644 --- a/lib/screens/metering/components/camera_container/provider_container_camera.dart +++ b/lib/screens/metering/components/camera_container/provider_container_camera.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/data/models/exposure_pair.dart'; import 'package:lightmeter/interactors/metering_interactor.dart'; -import 'package:lightmeter/providers/equipment_profile_provider.dart'; import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; @@ -40,9 +39,7 @@ class CameraContainerProvider extends StatelessWidget { child: CameraContainer( fastest: fastest, slowest: slowest, - isoValues: EquipmentProfile.of(context).isoValues, iso: iso, - ndValues: EquipmentProfile.of(context).ndValues, nd: nd, onIsoChanged: onIsoChanged, onNdChanged: onNdChanged, diff --git a/lib/screens/metering/components/camera_container/widget_container_camera.dart b/lib/screens/metering/components/camera_container/widget_container_camera.dart index 5c173d7..388febd 100644 --- a/lib/screens/metering/components/camera_container/widget_container_camera.dart +++ b/lib/screens/metering/components/camera_container/widget_container_camera.dart @@ -21,9 +21,7 @@ import 'state_container_camera.dart'; class CameraContainer extends StatelessWidget { final ExposurePair? fastest; final ExposurePair? slowest; - final List isoValues; final IsoValue iso; - final List ndValues; final NdValue nd; final ValueChanged onIsoChanged; final ValueChanged onNdChanged; @@ -32,9 +30,7 @@ class CameraContainer extends StatelessWidget { const CameraContainer({ required this.fastest, required this.slowest, - required this.isoValues, required this.iso, - required this.ndValues, required this.nd, required this.onIsoChanged, required this.onNdChanged, @@ -60,9 +56,7 @@ class CameraContainer extends StatelessWidget { readingsContainer: ReadingsContainer( fastest: fastest, slowest: slowest, - isoValues: isoValues, iso: iso, - ndValues: ndValues, nd: nd, onIsoChanged: onIsoChanged, onNdChanged: onNdChanged, diff --git a/lib/screens/metering/components/light_sensor_container/provider_container_light_sensor.dart b/lib/screens/metering/components/light_sensor_container/provider_container_light_sensor.dart index bab0c7b..8c18395 100644 --- a/lib/screens/metering/components/light_sensor_container/provider_container_light_sensor.dart +++ b/lib/screens/metering/components/light_sensor_container/provider_container_light_sensor.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/data/models/exposure_pair.dart'; import 'package:lightmeter/interactors/metering_interactor.dart'; -import 'package:lightmeter/providers/equipment_profile_provider.dart'; import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; @@ -40,9 +39,7 @@ class LightSensorContainerProvider extends StatelessWidget { child: LightSensorContainer( fastest: fastest, slowest: slowest, - isoValues: EquipmentProfile.of(context).isoValues, iso: iso, - ndValues: EquipmentProfile.of(context).ndValues, nd: nd, onIsoChanged: onIsoChanged, onNdChanged: onNdChanged, diff --git a/lib/screens/metering/components/light_sensor_container/widget_container_light_sensor.dart b/lib/screens/metering/components/light_sensor_container/widget_container_light_sensor.dart index 34018ac..2151ee0 100644 --- a/lib/screens/metering/components/light_sensor_container/widget_container_light_sensor.dart +++ b/lib/screens/metering/components/light_sensor_container/widget_container_light_sensor.dart @@ -9,9 +9,7 @@ import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; class LightSensorContainer extends StatelessWidget { final ExposurePair? fastest; final ExposurePair? slowest; - final List isoValues; final IsoValue iso; - final List ndValues; final NdValue nd; final ValueChanged onIsoChanged; final ValueChanged onNdChanged; @@ -20,9 +18,7 @@ class LightSensorContainer extends StatelessWidget { const LightSensorContainer({ required this.fastest, required this.slowest, - required this.isoValues, required this.iso, - required this.ndValues, required this.nd, required this.onIsoChanged, required this.onNdChanged, @@ -38,9 +34,7 @@ class LightSensorContainer extends StatelessWidget { readingsContainer: ReadingsContainer( fastest: fastest, slowest: slowest, - isoValues: isoValues, iso: iso, - ndValues: ndValues, nd: nd, onIsoChanged: onIsoChanged, onNdChanged: onNdChanged, diff --git a/lib/screens/metering/components/shared/readings_container/widget_container_readings.dart b/lib/screens/metering/components/shared/readings_container/widget_container_readings.dart index 12e2772..8250298 100644 --- a/lib/screens/metering/components/shared/readings_container/widget_container_readings.dart +++ b/lib/screens/metering/components/shared/readings_container/widget_container_readings.dart @@ -15,9 +15,7 @@ import 'components/reading_value_container/widget_container_reading_value.dart'; class ReadingsContainer extends StatelessWidget { final ExposurePair? fastest; final ExposurePair? slowest; - final List isoValues; final IsoValue iso; - final List ndValues; final NdValue nd; final ValueChanged onIsoChanged; final ValueChanged onNdChanged; @@ -25,9 +23,7 @@ class ReadingsContainer extends StatelessWidget { const ReadingsContainer({ required this.fastest, required this.slowest, - required this.isoValues, required this.iso, - required this.ndValues, required this.nd, required this.onIsoChanged, required this.onNdChanged, @@ -63,7 +59,7 @@ class ReadingsContainer extends StatelessWidget { Expanded( child: _IsoValuePicker( selectedValue: iso, - values: isoValues, + values: EquipmentProfile.of(context).isoValues, onChanged: onIsoChanged, ), ), @@ -71,7 +67,7 @@ class ReadingsContainer extends StatelessWidget { Expanded( child: _NdValuePicker( selectedValue: nd, - values: ndValues, + values: EquipmentProfile.of(context).ndValues, onChanged: onNdChanged, ), ),