m3_lightmeter/lib/platform_config.dart
Vadim 5eb0869aa0 Fixed CameraPreview aspect ratio
Probably will be changed in future, is it currently relies on the `ResolutionPreset` being tied with aspect ratio
2023-01-07 13:23:54 +03:00

6 lines
247 B
Dart

class PlatformConfig {
static double get cameraPreviewAspectRatio {
final rational = const String.fromEnvironment('cameraPreviewAspectRatio', defaultValue: "3/4").split('/');
return int.parse(rational[0]) / int.parse(rational[1]);
}
}