This commit is contained in:
Vadim 2023-06-23 10:31:08 +02:00
parent f5b71e98b6
commit de24b98782

View file

@ -8,7 +8,7 @@ void main() {
late CaffeineService service; late CaffeineService service;
const methodChannel = MethodChannel('com.vodemn.lightmeter/keepScreenOn'); const methodChannel = MethodChannel('com.vodemn.lightmeter/keepScreenOn');
Future<Object?>? cameraMethodCallSuccessHandler(MethodCall methodCall) async { Future<Object?>? methodCallSuccessHandler(MethodCall methodCall) async {
switch (methodCall.method) { switch (methodCall.method) {
case "isKeepScreenOn": case "isKeepScreenOn":
return true; return true;
@ -22,7 +22,7 @@ void main() {
setUp(() { setUp(() {
service = const CaffeineService(); service = const CaffeineService();
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(methodChannel, cameraMethodCallSuccessHandler); .setMockMethodCallHandler(methodChannel, methodCallSuccessHandler);
}); });
tearDown(() { tearDown(() {