mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
abd07764fd
added `ZoomSlider` (wip) wip implemented horizontal slider implemented vertical slider integrated 2 sliders to metering screen (wip) removed filled track placed camera slider in the proper folder temp fix for exposure list fonts update exposure event added ruler to `CameraExposureSlider` moved slider sizes to dimens moved `CameraZoomSlider` to the separate folder
31 lines
1,015 B
Dart
31 lines
1,015 B
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/widget_slider_camera.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 CameraSlider(
|
|
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();
|
|
},
|
|
);
|
|
}
|
|
}
|