mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 23:35:25 +02:00
added missing file
This commit is contained in:
parent
85fcb05a5e
commit
f00d8f14ad
16
lib/native_events/window_focus.dart
Normal file
16
lib/native_events/window_focus.dart
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
class EventChannelWindowFocus {
|
||||||
|
static const MethodChannel _channel =
|
||||||
|
const MethodChannel('floss.myzel394.quid_faciam_hodie/window_focus');
|
||||||
|
|
||||||
|
static void setGlobalListener(void Function(bool) listener) {
|
||||||
|
_channel.setMethodCallHandler((call) async {
|
||||||
|
if (call.method == 'windowFocusChanged') {
|
||||||
|
listener(call.arguments as bool);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user