mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-10-19 14:50:40 +00:00
ec9ba1a779
* indicate EV value error * allow nullable ev100 in `CameraContainerBloc` * log exif keys * wip * removed `UserPreferencesService` from `MeteringBloc` * added error toast * conflicts * lints * allow stop metering if `hasError` * fixed `AnimatedDialogPicker` inability to close * Update build.gradle
48 lines
1.5 KiB
Dart
48 lines
1.5 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 bool hasError;
|
|
final VoidCallback? onSwitchEvSourceType;
|
|
final VoidCallback onMeasure;
|
|
final VoidCallback onSettings;
|
|
|
|
const MeteringBottomControlsProvider({
|
|
required this.ev,
|
|
required this.isMetering,
|
|
required this.hasError,
|
|
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,
|
|
hasError: hasError,
|
|
onSwitchEvSourceType: onSwitchEvSourceType,
|
|
onMeasure: onMeasure,
|
|
onSettings: onSettings,
|
|
),
|
|
);
|
|
}
|
|
}
|