onEvents static method
Implementation
static onEvents(Function(Map res) callback) async {
try {
final CallbackHandle handle = PluginUtilities.getCallbackHandle(callback)!;
await _channel.invokeMethod('on', {
'listener': 'events',
'callbackHandle':
handle.toRawHandle()
});
} on PlatformException catch (e) {
print(e);
}
}