mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-13 03:30:40 +00:00
19 lines
479 B
Dart
19 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();
|
||
|
}
|
||
|
}
|