invoke method
Future<bool>
invoke({
- required String methodName,
- required dynamic arguments,
- required Future<
void> callbacks(- MethodCall call
Implementation
Future<bool> invoke(
{required String methodName,
required dynamic arguments,
required Future<void> Function(MethodCall call) callbacks}) async {
_methodChannel.setMethodCallHandler(callbacks);
bool? result = false;
try {
result = await _methodChannel.invokeMethod<bool>(methodName, arguments);
} on PlatformException catch (e) {
debugPrint('$_tag:: Error = $e');
}
return result!;
}