methodInvoker function
Implementation
Future<void> methodInvoker(MethodChannel channel, String eventName, [dynamic params]) async {
try {
await channel.invokeMethod<void>(eventName, params ?? {'data': 'empty'});
} on PlatformException catch (e) {
print(e.message);
}
}