m3_lightmeter/lib/data/camera_info_service.dart
2025-05-11 13:17:52 +02:00

16 lines
467 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();
Future<int?> mainCameraEfl() async {
final focalLength = await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl');
return focalLength?.round();
}
}