mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-26 01:10:39 +00:00
calculate layout height based on MeteringScreenLayoutFeature
This commit is contained in:
parent
0fc3f512f3
commit
3643f04250
2 changed files with 9 additions and 6 deletions
|
@ -17,7 +17,6 @@ import 'package:lightmeter/screens/metering/components/camera_container/state_co
|
|||
import 'package:lightmeter/screens/metering/components/shared/exposure_pairs_list/widget_list_exposure_pairs.dart';
|
||||
import 'package:lightmeter/screens/metering/components/shared/metering_top_bar/widget_top_bar_metering.dart';
|
||||
import 'package:lightmeter/screens/metering/components/shared/readings_container/widget_container_readings.dart';
|
||||
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
||||
class CameraContainer extends StatelessWidget {
|
||||
|
@ -52,7 +51,11 @@ class CameraContainer extends StatelessWidget {
|
|||
|
||||
double topBarOverflow = Dimens.readingContainerSingleValueHeight + // ISO & ND
|
||||
-cameraViewHeight;
|
||||
if (IAPProducts.isPurchased(context, IAPProductType.equipment)) {
|
||||
|
||||
if (MeteringScreenLayout.featureOf(
|
||||
context,
|
||||
MeteringScreenLayoutFeature.equipmentProfiles,
|
||||
)) {
|
||||
topBarOverflow += Dimens.readingContainerSingleValueHeight;
|
||||
topBarOverflow += Dimens.paddingS;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import 'package:lightmeter/res/dimens.dart';
|
|||
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/animated_dialog_picker/widget_picker_dialog_animated.dart';
|
||||
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/reading_value_container/widget_container_reading_value.dart';
|
||||
import 'package:lightmeter/utils/inherited_generics.dart';
|
||||
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
||||
class ReadingsContainer extends StatelessWidget {
|
||||
|
@ -36,12 +35,13 @@ class ReadingsContainer extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final layout = MeteringScreenLayout.of(context);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (IAPProducts.isPurchased(context, IAPProductType.equipment) &&
|
||||
layout[MeteringScreenLayoutFeature.equipmentProfiles]!) ...[
|
||||
if (MeteringScreenLayout.featureOf(
|
||||
context,
|
||||
MeteringScreenLayoutFeature.equipmentProfiles,
|
||||
)) ...[
|
||||
const _EquipmentProfilePicker(),
|
||||
const _InnerPadding(),
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue