Compare commits

...

6 commits

Author SHA1 Message Date
Vadim
44304a0bc2 wip 2025-05-12 00:36:41 +02:00
Vadim
c95dcf3565 [android] updated store screenshots 2025-05-12 00:36:28 +02:00
Vadim
bb7fca310d updated goldens 2025-05-12 00:35:50 +02:00
Vadim
b16b75bf44 fixed screenshot generator 2025-05-12 00:31:20 +02:00
Vadim
ffac40fc1f [ios] fixed signing 2025-05-11 23:26:50 +02:00
Vadim
2b65c838d9 updated Pro features screen 2025-05-11 23:21:33 +02:00
18 changed files with 49 additions and 21 deletions

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:lightmeter/providers/equipment_profile_provider.dart'; import 'package:lightmeter/providers/equipment_profile_provider.dart';
import 'package:lightmeter/providers/films_provider.dart'; import 'package:lightmeter/providers/films_provider.dart';
@ -115,7 +117,9 @@ final mockEquipmentProfiles = [
IsoValue(1600, StopType.full), IsoValue(1600, StopType.full),
IsoValue(3200, StopType.full), IsoValue(3200, StopType.full),
], ],
lensZoom: 1.91, lensZoom: Platform.isAndroid
? 2.083333 // Pixel 6
: 1.923, // iPhone 13 Pro
), ),
EquipmentProfile( EquipmentProfile(
id: '2', id: '2',
@ -145,7 +149,9 @@ final mockEquipmentProfiles = [
IsoValue(1600, StopType.full), IsoValue(1600, StopType.full),
IsoValue(3200, StopType.full), IsoValue(3200, StopType.full),
], ],
lensZoom: 5.02, lensZoom: Platform.isAndroid
? 5.625 // Pixel 6
: 5.1923, // iPhone 13 Pro
), ),
]; ];

View file

@ -619,9 +619,11 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 489Z6UQMGN; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 489Z6UQMGN;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Lightmeter; INFOPLIST_KEY_CFBundleDisplayName = Lightmeter;
@ -633,6 +635,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.vodemn.lightmeter; PRODUCT_BUNDLE_IDENTIFIER = com.vodemn.lightmeter;
PRODUCT_NAME = Lightmeter; PRODUCT_NAME = Lightmeter;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Lightmeter Distribution";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";

View file

@ -9,6 +9,8 @@ class CameraInfoService {
const CameraInfoService(); const CameraInfoService();
// TODO: fix focal length for iOS screenshots
// TODO: fix integration test (find 1.91x)
Future<int?> mainCameraEfl() async { Future<int?> mainCameraEfl() async {
final focalLength = await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl'); final focalLength = await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl');
return focalLength?.round(); return focalLength?.round();

View file

@ -6,8 +6,8 @@ enum AppFeature {
incidedntLightMetering, incidedntLightMetering,
isoAndNdValues, isoAndNdValues,
themeEngine, themeEngine,
spotMetering, spotMeteringAndHistogram,
histogram, focalLength,
listOfFilms, listOfFilms,
customFilms, customFilms,
equipmentProfiles, equipmentProfiles,
@ -28,10 +28,10 @@ enum AppFeature {
return S.of(context).featureIsoAndNdValues; return S.of(context).featureIsoAndNdValues;
case AppFeature.themeEngine: case AppFeature.themeEngine:
return S.of(context).featureTheme; return S.of(context).featureTheme;
case AppFeature.spotMetering: case AppFeature.spotMeteringAndHistogram:
return S.of(context).featureSpotMetering; return S.of(context).featureSpotMeteringAndHistorgram;
case AppFeature.histogram: case AppFeature.focalLength:
return S.of(context).featureHistogram; return S.of(context).featureFocalLength35mm;
case AppFeature.listOfFilms: case AppFeature.listOfFilms:
return S.of(context).featureListOfFilms; return S.of(context).featureListOfFilms;
case AppFeature.customFilms: case AppFeature.customFilms:

View file

@ -113,8 +113,8 @@
"featureIncidentLightMetering": "Messung von einfallendem Licht", "featureIncidentLightMetering": "Messung von einfallendem Licht",
"featureIsoAndNdValues": "Große Auswahl von ISO und ND Filtern", "featureIsoAndNdValues": "Große Auswahl von ISO und ND Filtern",
"featureTheme": "Theme Anpassung", "featureTheme": "Theme Anpassung",
"featureSpotMetering": "Punktmessung", "featureSpotMeteringAndHistorgram": "Spotmessung und Histogramm",
"featureHistogram": "Histogramm", "featureFocalLength35mm": "35mm-äquivalente Brennweite statt Zoom",
"featureListOfFilms": "Liste von 20+ Filmen mit Reziprozitätsformeln", "featureListOfFilms": "Liste von 20+ Filmen mit Reziprozitätsformeln",
"featureCustomFilms": "Eigene Filme erstellen", "featureCustomFilms": "Eigene Filme erstellen",
"featureEquipmentProfiles": "Ausrüstungsprofile", "featureEquipmentProfiles": "Ausrüstungsprofile",

View file

@ -113,8 +113,8 @@
"featureIncidentLightMetering": "Incident light metering", "featureIncidentLightMetering": "Incident light metering",
"featureIsoAndNdValues": "Wide range of ISO and ND filters values", "featureIsoAndNdValues": "Wide range of ISO and ND filters values",
"featureTheme": "Theme customization", "featureTheme": "Theme customization",
"featureSpotMetering": "Spot metering", "featureSpotMeteringAndHistorgram": "Spot metering and histogram",
"featureHistogram": "Histogram", "featureFocalLength35mm": "35mm equivalent focal length instead of zoom",
"featureListOfFilms": "List of 20+ films with reciprocity formulas", "featureListOfFilms": "List of 20+ films with reciprocity formulas",
"featureCustomFilms": "Ability to create custom films", "featureCustomFilms": "Ability to create custom films",
"featureEquipmentProfiles": "Equipment profiles", "featureEquipmentProfiles": "Equipment profiles",

View file

@ -114,8 +114,8 @@
"featureIncidentLightMetering": "Mesure de la lumière incidente", "featureIncidentLightMetering": "Mesure de la lumière incidente",
"featureIsoAndNdValues": "Large gamme de valeurs ISO et de filtres ND", "featureIsoAndNdValues": "Large gamme de valeurs ISO et de filtres ND",
"featureTheme": "Personnalisation du thème", "featureTheme": "Personnalisation du thème",
"featureSpotMetering": "Mesure spot", "featureSpotMeteringAndHistorgram": "Mesure spot et histogramme",
"featureHistogram": "Histogramme", "featureFocalLength35mm": "Focale équivalente 35 mm au lieu du zoom",
"featureListOfFilms": "Liste de plus de 20 films avec des formules de correction", "featureListOfFilms": "Liste de plus de 20 films avec des formules de correction",
"featureCustomFilms": "Possibilité de créer des films personnalisés", "featureCustomFilms": "Possibilité de créer des films personnalisés",
"featureEquipmentProfiles": "Profils de l'équipement", "featureEquipmentProfiles": "Profils de l'équipement",

View file

@ -113,8 +113,8 @@
"featureIncidentLightMetering": "Замер падающего света", "featureIncidentLightMetering": "Замер падающего света",
"featureIsoAndNdValues": "Широкий диапазон значений ISO и фильтров ND", "featureIsoAndNdValues": "Широкий диапазон значений ISO и фильтров ND",
"featureTheme": "Настройка темы", "featureTheme": "Настройка темы",
"featureSpotMetering": "Точечный замер", "featureSpotMeteringAndHistorgram": "Точечный замер и гистограмма",
"featureHistogram": "Гистограмма", "featureFocalLength35mm": "Эквивалентное фокусное расстояние 35 мм вместо зума",
"featureListOfFilms": "Список из 20+ плёнок с формулами коррекции", "featureListOfFilms": "Список из 20+ плёнок с формулами коррекции",
"featureCustomFilms": "Возможность создания собственных плёнок", "featureCustomFilms": "Возможность создания собственных плёнок",
"featureEquipmentProfiles": "Профили оборудования", "featureEquipmentProfiles": "Профили оборудования",

View file

@ -112,8 +112,8 @@
"featureIncidentLightMetering": "入射光测光", "featureIncidentLightMetering": "入射光测光",
"featureIsoAndNdValues": "更广的 ISO 和 ND 滤镜系数范围", "featureIsoAndNdValues": "更广的 ISO 和 ND 滤镜系数范围",
"featureTheme": "主题自定义", "featureTheme": "主题自定义",
"featureSpotMetering": "点测光", "featureSpotMeteringAndHistorgram": "点测光与直方图",
"featureHistogram": "直方图", "featureFocalLength35mm": "35mm 等效焦距替代变焦",
"featureListOfFilms": "20多种胶片的补偿公式", "featureListOfFilms": "20多种胶片的补偿公式",
"featureCustomFilms": "创建自定义胶片", "featureCustomFilms": "创建自定义胶片",
"featureEquipmentProfiles": "设备配置文件", "featureEquipmentProfiles": "设备配置文件",

View file

@ -52,7 +52,7 @@ Apple requires screenshots a specific list of devices, so we can implement a cus
Can be run on Simulator. Can be run on Simulator.
```console ```console
sh screenshots/generate_ios_screenshots.sh sh screenshots/scripts/generate_ios_screenshots.sh
``` ```
### Apply store constraints and text data ### Apply store constraints and text data

View file

@ -6,6 +6,7 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';
import 'package:lightmeter/data/camera_info_service.dart';
import 'package:lightmeter/data/models/camera_feature.dart'; import 'package:lightmeter/data/models/camera_feature.dart';
import 'package:lightmeter/data/models/ev_source_type.dart'; import 'package:lightmeter/data/models/ev_source_type.dart';
import 'package:lightmeter/data/models/exposure_pair.dart'; import 'package:lightmeter/data/models/exposure_pair.dart';
@ -95,6 +96,19 @@ void main() {
setUpAll(() async { setUpAll(() async {
if (Platform.isAndroid) await binding.convertFlutterSurfaceToImage(); if (Platform.isAndroid) await binding.convertFlutterSurfaceToImage();
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(
CameraInfoService.cameraInfoPlatformChannel,
(methodCall) async {
switch (methodCall.method) {
case "mainCameraEfl":
return Platform.isAndroid
? 24.0 // Pixel 6
: 26.0; // iPhone 13 Pro
default:
return null;
}
},
);
}); });
/// Generates several screenshots with the light theme /// Generates several screenshots with the light theme
@ -128,6 +142,9 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await tester.tap(find.byIcon(Icons.edit_outlined).first); await tester.tap(find.byIcon(Icons.edit_outlined).first);
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await tester.tap(find.text(S.current.isoValues)); // open and close a dialog to hide keyboard
await tester.pumpAndSettle();
await tester.tapCancelButton();
await tester.takeScreenshotLight(binding, 'equipment-profiles'); await tester.takeScreenshotLight(binding, 'equipment-profiles');
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 KiB

After

Width:  |  Height:  |  Size: 478 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB