decrypt method

  1. @override
Future<String> decrypt(
  1. String encrypted
)
override

Implementation

@override
Future<String> decrypt(String encrypted) async {
  final decrypted = await methodChannel
      .invokeMethod<String>('decrypt', {'data': encrypted});
  if (decrypted == null) {
    throw PlatformException(
      code: 'DECRYPTION_FAILED',
      message: 'Decryption returned null',
    );
  }
  return decrypted;
}