mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +00:00
hide CameraHistogram
& CameraSpotDetector
if purchasable
This commit is contained in:
parent
17cd99e8a9
commit
1bd0fe577e
1 changed files with 18 additions and 15 deletions
|
@ -9,6 +9,7 @@ import 'package:lightmeter/screens/metering/components/camera_container/componen
|
||||||
import 'package:lightmeter/screens/metering/components/camera_container/components/camera_preview/components/camera_view_placeholder/widget_placeholder_camera_view.dart';
|
import 'package:lightmeter/screens/metering/components/camera_container/components/camera_preview/components/camera_view_placeholder/widget_placeholder_camera_view.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart';
|
import 'package:lightmeter/screens/metering/components/camera_container/components/camera_preview/components/histogram/widget_histogram.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/camera_container/models/camera_error_type.dart';
|
import 'package:lightmeter/screens/metering/components/camera_container/models/camera_error_type.dart';
|
||||||
|
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||||
|
|
||||||
class CameraPreview extends StatefulWidget {
|
class CameraPreview extends StatefulWidget {
|
||||||
final CameraController? controller;
|
final CameraController? controller;
|
||||||
|
@ -92,6 +93,7 @@ class _CameraPreviewBuilderState extends State<_CameraPreviewBuilder> {
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
children: [
|
children: [
|
||||||
CameraView(controller: widget.controller),
|
CameraView(controller: widget.controller),
|
||||||
|
if (IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) ...[
|
||||||
if (UserPreferencesProvider.cameraFeatureOf(
|
if (UserPreferencesProvider.cameraFeatureOf(
|
||||||
context,
|
context,
|
||||||
CameraFeature.histogram,
|
CameraFeature.histogram,
|
||||||
|
@ -108,6 +110,7 @@ class _CameraPreviewBuilderState extends State<_CameraPreviewBuilder> {
|
||||||
))
|
))
|
||||||
CameraSpotDetector(onSpotTap: widget.onSpotTap)
|
CameraSpotDetector(onSpotTap: widget.onSpotTap)
|
||||||
],
|
],
|
||||||
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue