mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-15 04:30:40 +00:00

* extract focal length from exif * added focal length section * wip * [android] calculate EFL * split other platform handlers to separate files * [ios] calculate EFL * updated translations * deleted `focalLengthFromTags` * fixed unit tests * [ios] link missing files * updated Pro features screen * [ios] fixed signing * fixed screenshot generator * updated goldens * [android] updated store screenshots * wip * [ios] updated store screenshots * enable focal length feature by default * mock camera focal length for integration tests * cleanup * added logging to `CameraInfoService`
19 lines
824 B
Dart
19 lines
824 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/data/models/camera_feature.dart';
|
|
import 'package:lightmeter/providers/services_provider.dart';
|
|
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
|
|
|
extension DoubleToZoom on double {
|
|
String toZoom(BuildContext context) {
|
|
final showFocalLength = UserPreferencesProvider.cameraFeatureOf(context, CameraFeature.showFocalLength);
|
|
final cameraFocalLength = ServicesProvider.of(context).userPreferencesService.cameraFocalLength;
|
|
|
|
if (showFocalLength && cameraFocalLength != null) {
|
|
ServicesProvider.of(context).userPreferencesService.cameraFocalLength;
|
|
final zoomedFocalLength = (this * cameraFocalLength).round();
|
|
return '${zoomedFocalLength}mm';
|
|
} else {
|
|
return 'x${toStringAsFixed(2)}';
|
|
}
|
|
}
|
|
}
|