diff --git a/integration_test/mocks/paid_features_mock.dart b/integration_test/mocks/paid_features_mock.dart index d404a24..f401617 100644 --- a/integration_test/mocks/paid_features_mock.dart +++ b/integration_test/mocks/paid_features_mock.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:lightmeter/providers/equipment_profile_provider.dart'; import 'package:lightmeter/providers/films_provider.dart'; @@ -115,7 +117,9 @@ final mockEquipmentProfiles = [ IsoValue(1600, StopType.full), IsoValue(3200, StopType.full), ], - lensZoom: 1.91, + lensZoom: Platform.isAndroid + ? 2.083333 // Pixel 6 + : 1.923, // iPhone 13 Pro ), EquipmentProfile( id: '2', @@ -145,7 +149,9 @@ final mockEquipmentProfiles = [ IsoValue(1600, StopType.full), IsoValue(3200, StopType.full), ], - lensZoom: 5.02, + lensZoom: Platform.isAndroid + ? 5.625 // Pixel 6 + : 5.1923, // iPhone 13 Pro ), ]; diff --git a/lib/data/camera_info_service.dart b/lib/data/camera_info_service.dart index 44819b6..02c0f98 100644 --- a/lib/data/camera_info_service.dart +++ b/lib/data/camera_info_service.dart @@ -9,6 +9,8 @@ class CameraInfoService { const CameraInfoService(); + // TODO: fix focal length for iOS screenshots + // TODO: fix integration test (find 1.91x) Future mainCameraEfl() async { final focalLength = await cameraInfoPlatformChannel.invokeMethod('mainCameraEfl'); return focalLength?.round();