mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +00:00
9ffb5112c1
* wip * rename * wip * rename * fixed camera screen layout * omit camera measure on startup * added calibration for light sensor * save evsource * Update widget_button_measure.dart * fixed iOS init * hide light sensor calibration on ios * cleanup
46 lines
1.5 KiB
Dart
46 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:lightmeter/data/haptics_service.dart';
|
|
import 'package:lightmeter/data/light_sensor_service.dart';
|
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
|
import 'package:lightmeter/data/shared_prefs_service.dart';
|
|
import 'package:lightmeter/interactors/metering_interactor.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'bloc_metering.dart';
|
|
import 'communication/bloc_communication_metering.dart';
|
|
import 'screen_metering.dart';
|
|
|
|
class MeteringFlow extends StatefulWidget {
|
|
const MeteringFlow({super.key});
|
|
|
|
@override
|
|
State<MeteringFlow> createState() => _MeteringFlowState();
|
|
}
|
|
|
|
class _MeteringFlowState extends State<MeteringFlow> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Provider(
|
|
create: (context) => MeteringInteractor(
|
|
context.read<UserPreferencesService>(),
|
|
context.read<HapticsService>(),
|
|
context.read<LightSensorService>(),
|
|
),
|
|
child: MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider(create: (_) => MeteringCommunicationBloc()),
|
|
BlocProvider(
|
|
create: (context) => MeteringBloc(
|
|
context.read<MeteringCommunicationBloc>(),
|
|
context.read<UserPreferencesService>(),
|
|
context.read<MeteringInteractor>(),
|
|
context.read<StopType>(),
|
|
),
|
|
),
|
|
],
|
|
child: const MeteringScreen(),
|
|
),
|
|
);
|
|
}
|
|
}
|