mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-13 19:50:41 +00:00
18 lines
560 B
Dart
18 lines
560 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
class CameraInfoService {
|
|
@visibleForTesting
|
|
static const cameraInfoPlatformChannel = MethodChannel(
|
|
"com.vodemn.lightmeter.CameraInfoPlatformChannel.MethodChannel",
|
|
);
|
|
|
|
const CameraInfoService();
|
|
|
|
// TODO: fix focal length for iOS screenshots
|
|
// TODO: fix integration test (find 1.91x)
|
|
Future<int?> mainCameraEfl() async {
|
|
final focalLength = await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl');
|
|
return focalLength?.round();
|
|
}
|
|
}
|