mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 08:20:40 +00:00
50 lines
1.5 KiB
Dart
50 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
|
import 'package:lightmeter/data/models/photography_values/nd_value.dart';
|
|
import 'package:lightmeter/interactors/metering_interactor.dart';
|
|
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
|
|
|
import 'bloc_container_camera.dart';
|
|
import 'widget_container_camera.dart';
|
|
|
|
class CameraContainerProvider extends StatelessWidget {
|
|
final ExposurePair? fastest;
|
|
final ExposurePair? slowest;
|
|
final IsoValue iso;
|
|
final NdValue nd;
|
|
final ValueChanged<IsoValue> onIsoChanged;
|
|
final ValueChanged<NdValue> onNdChanged;
|
|
final List<ExposurePair> exposurePairs;
|
|
|
|
const CameraContainerProvider({
|
|
required this.fastest,
|
|
required this.slowest,
|
|
required this.iso,
|
|
required this.nd,
|
|
required this.onIsoChanged,
|
|
required this.onNdChanged,
|
|
required this.exposurePairs,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (context) => CameraContainerBloc(
|
|
context.read<MeteringCommunicationBloc>(),
|
|
context.read<MeteringInteractor>(),
|
|
),
|
|
child: CameraContainer(
|
|
fastest: fastest,
|
|
slowest: slowest,
|
|
iso: iso,
|
|
nd: nd,
|
|
onIsoChanged: onIsoChanged,
|
|
onNdChanged: onNdChanged,
|
|
exposurePairs: exposurePairs,
|
|
),
|
|
);
|
|
}
|
|
}
|