mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-12 19:20:42 +00:00
18 lines
479 B
Dart
18 lines
479 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
class CameraInfoService {
|
|
@visibleForTesting
|
|
static const cameraInfoPlatformChannel = MethodChannel("com.vodemn.lightmeter.CameraInfoPlatformChannel");
|
|
|
|
const CameraInfoService();
|
|
|
|
Future<int?> mainCameraEfl() async {
|
|
if (Platform.isIOS) {
|
|
return null;
|
|
}
|
|
return (await cameraInfoPlatformChannel.invokeMethod<double?>('mainCameraEfl'))?.round();
|
|
}
|
|
}
|