MethodChannelWindowFocus constructor
MethodChannelWindowFocus()
Implementation
MethodChannelWindowFocus() {
methodChannel.setMethodCallHandler((call) async {
if (call.method == 'onFocusChange') {
_eventBus.fireEvent<AppWindowDto>(AppWindowDto(
appName: call.arguments['appName'],
windowTitle: call.arguments['windowTitle']));
} else if (call.method == 'onUserActiveChange') {
userActive = call.arguments;
_eventBus.fireEvent<bool>(userActive);
} else {
print(call.method);
}
});
}