mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-10-19 23:00:39 +00:00
74d0a7101c
* removed redundant `UserPreferencesService` from `MeteringBloc` * wip * post-merge fixes * `MeasureEvent` tests * `MeasureEvent` tests revision * `MeasureEvent` tests added timeout * added stubs for other `MeteringBloc` events * rewritten `MeteringBloc` logic * wip * `IsoChangedEvent` tests * refined `IsoChangedEvent` tests * `NdChangedEvent` tests * `FilmChangedEvent` tests * `MeteringCommunicationBloc` tests * added test run to ci * overriden `==` for `MeasuredState` * `LuxMeteringEvent` tests * refined `LuxMeteringEvent` tests * rename * wip * wip * `InitializeEvent`/`DeinitializeEvent` tests * clamp minZoomLevel * fixed `MeteringCommunicationBloc` tests * wip * `ZoomChangedEvent` tests * `ExposureOffsetChangedEvent`/`ExposureOffsetResetEvent` tests * renamed test groups * added test coverage script * improved `CameraContainerBloc` test coverage * `EquipmentProfileChangedEvent` tests * verify response vibration * fixed running all tests * `MeteringCommunicationBloc` equality tests * `CameraContainerBloc` equality tests * removed generated code from coverage
45 lines
1.4 KiB
Dart
45 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/res/dimens.dart';
|
|
|
|
import 'package:lightmeter/screens/metering/components/bottom_controls/widget_bottom_controls.dart';
|
|
|
|
class MeteringBottomControlsProvider extends StatelessWidget {
|
|
final double? ev;
|
|
final bool isMetering;
|
|
final VoidCallback? onSwitchEvSourceType;
|
|
final VoidCallback onMeasure;
|
|
final VoidCallback onSettings;
|
|
|
|
const MeteringBottomControlsProvider({
|
|
required this.ev,
|
|
required this.isMetering,
|
|
required this.onSwitchEvSourceType,
|
|
required this.onMeasure,
|
|
required this.onSettings,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final scheme = Theme.of(context).colorScheme;
|
|
return IconButtonTheme(
|
|
data: IconButtonThemeData(
|
|
style: ButtonStyle(
|
|
backgroundColor: MaterialStatePropertyAll(scheme.surface),
|
|
elevation: const MaterialStatePropertyAll(4),
|
|
iconColor: MaterialStatePropertyAll(scheme.onSurface),
|
|
shadowColor: const MaterialStatePropertyAll(Colors.transparent),
|
|
surfaceTintColor: MaterialStatePropertyAll(scheme.surfaceTint),
|
|
fixedSize: const MaterialStatePropertyAll(Size(Dimens.grid48, Dimens.grid48)),
|
|
),
|
|
),
|
|
child: MeteringBottomControls(
|
|
ev: ev,
|
|
isMetering: isMetering,
|
|
onSwitchEvSourceType: onSwitchEvSourceType,
|
|
onMeasure: onMeasure,
|
|
onSettings: onSettings,
|
|
),
|
|
);
|
|
}
|
|
}
|