m3_lightmeter/lib/screens/metering/components/camera/widget_zoom_camera.dart
Vadim 130f5ff0b2
ML-14 Implement EV calibration legacy feature (#15)
* wip

* implemented `CalibrationDialog`

* integrated calibration to the metering bloc

* checked legacy feature
2023-01-26 12:10:23 +03:00

31 lines
1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:lightmeter/screens/metering/ev_source/camera/bloc_camera.dart';
import 'package:lightmeter/screens/metering/ev_source/camera/event_camera.dart';
import 'package:lightmeter/screens/metering/ev_source/camera/state_camera.dart';
import '../../../shared/centered_slider/widget_slider_centered.dart';
class CameraZoomSlider extends StatelessWidget {
const CameraZoomSlider({super.key});
@override
Widget build(BuildContext context) {
return BlocBuilder<CameraBloc, CameraState>(
builder: (context, state) {
if (state is CameraActiveState) {
return CenteredSlider(
icon: const Icon(Icons.search),
value: state.currentZoom,
min: state.minZoom,
max: state.maxZoom,
onChanged: (value) {
context.read<CameraBloc>().add(ZoomChangedEvent(value));
},
);
}
return const SizedBox();
},
);
}
}