m3_lightmeter/lib/data/camera_info_service.dart

17 lines
467 B
Dart
Raw Normal View History

2025-05-11 09:50:01 +00:00
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
class CameraInfoService {
@visibleForTesting
static const cameraInfoPlatformChannel = MethodChannel(
"com.vodemn.lightmeter.CameraInfoPlatformChannel.MethodChannel",
);
2025-05-11 09:50:01 +00:00
const CameraInfoService();
Future<int?> mainCameraEfl() async {
2025-05-11 11:17:52 +00:00
final focalLength = await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl');
return focalLength?.round();
2025-05-11 09:50:01 +00:00
}
}