call method

  1. @override
Future call(
  1. String method, [
  2. dynamic arguments
])
override

Implementation

@override
Future<dynamic> call(String method, [arguments]) async {
  final result = await methodChannel.invokeMethod<dynamic>(method, arguments);
  if (result is bool) {
    return result;
  }

  if (method == 'ownPublicKey' || method == 'peerPublicKey') {
    return result;
  }

  return result != null ? jsonDecode(result as String) : null;
}