mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
context.get<MeteringInteractor>()
This commit is contained in:
parent
c0713e411d
commit
424c54e5e5
3 changed files with 7 additions and 5 deletions
|
@ -6,6 +6,7 @@ import 'package:lightmeter/interactors/metering_interactor.dart';
|
|||
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
||||
import 'package:lightmeter/screens/metering/components/camera_container/bloc_container_camera.dart';
|
||||
import 'package:lightmeter/screens/metering/components/camera_container/widget_container_camera.dart';
|
||||
import 'package:lightmeter/utils/inherited_generics.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
||||
class CameraContainerProvider extends StatelessWidget {
|
||||
|
@ -37,7 +38,7 @@ class CameraContainerProvider extends StatelessWidget {
|
|||
return BlocProvider(
|
||||
lazy: false,
|
||||
create: (context) => CameraContainerBloc(
|
||||
context.read<MeteringInteractor>(),
|
||||
context.get<MeteringInteractor>(),
|
||||
context.read<MeteringCommunicationBloc>(),
|
||||
),
|
||||
child: CameraContainer(
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:lightmeter/interactors/metering_interactor.dart';
|
|||
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
||||
import 'package:lightmeter/screens/metering/components/light_sensor_container/bloc_container_light_sensor.dart';
|
||||
import 'package:lightmeter/screens/metering/components/light_sensor_container/widget_container_light_sensor.dart';
|
||||
import 'package:lightmeter/utils/inherited_generics.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
||||
class LightSensorContainerProvider extends StatelessWidget {
|
||||
|
@ -37,7 +38,7 @@ class LightSensorContainerProvider extends StatelessWidget {
|
|||
return BlocProvider(
|
||||
lazy: false,
|
||||
create: (context) => LightSensorContainerBloc(
|
||||
context.read<MeteringInteractor>(),
|
||||
context.get<MeteringInteractor>(),
|
||||
context.read<MeteringCommunicationBloc>(),
|
||||
),
|
||||
child: LightSensorContainer(
|
||||
|
|
|
@ -23,8 +23,8 @@ class MeteringFlow extends StatefulWidget {
|
|||
class _MeteringFlowState extends State<MeteringFlow> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Provider(
|
||||
create: (context) => MeteringInteractor(
|
||||
return InheritedWidgetBase<MeteringInteractor>(
|
||||
data: MeteringInteractor(
|
||||
context.get<UserPreferencesService>(),
|
||||
context.get<CaffeineService>(),
|
||||
context.get<HapticsService>(),
|
||||
|
@ -37,7 +37,7 @@ class _MeteringFlowState extends State<MeteringFlow> {
|
|||
BlocProvider(
|
||||
create: (context) => MeteringBloc(
|
||||
context.read<MeteringCommunicationBloc>(),
|
||||
context.read<MeteringInteractor>(),
|
||||
context.get<MeteringInteractor>(),
|
||||
context.get<EquipmentProfile>(),
|
||||
context.get<StopType>(),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue