getPublicKey method

  1. @override
Future<String> getPublicKey(
  1. String alias
)
override

Retrieves the public key in PEM format.

Implementation

@override
Future<String> getPublicKey(String alias) async {
  final result = await _channel.invokeMethod<String>(
    'getPublicKey',
    {'alias': alias},
  );

  if (result == null) {
    throw PlatformException(
      code: 'NULL_PUBLIC_KEY',
      message: 'Public key is null',
    );
  }

  return result;
}