mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-14 20:20:40 +00:00

* extract focal length from exif * added focal length section * wip * [android] calculate EFL * split other platform handlers to separate files * [ios] calculate EFL * updated translations * deleted `focalLengthFromTags` * fixed unit tests * [ios] link missing files * updated Pro features screen * [ios] fixed signing * fixed screenshot generator * updated goldens * [android] updated store screenshots * wip * [ios] updated store screenshots * enable focal length feature by default * mock camera focal length for integration tests * cleanup * added logging to `CameraInfoService`
17 lines
569 B
Dart
17 lines
569 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
class CaffeineService {
|
|
@visibleForTesting
|
|
static const caffeineMethodChannel = MethodChannel("com.vodemn.lightmeter.CaffeinePlatformChannel.MethodChannel");
|
|
|
|
const CaffeineService();
|
|
|
|
Future<bool> isKeepScreenOn() async {
|
|
return caffeineMethodChannel.invokeMethod<bool>("isKeepScreenOn").then((value) => value!);
|
|
}
|
|
|
|
Future<bool> keepScreenOn(bool keep) async {
|
|
return caffeineMethodChannel.invokeMethod<bool>("setKeepScreenOn", keep).then((value) => value!);
|
|
}
|
|
}
|