add static method

Future<void> add({
  1. required String className,
})

Adds an Android Crypto Provider.

Implementation

static Future<void> add({required String className}) async {
  // Do a bit validation of the input
  if (!RegExp(r'^[a-zA-Z\d_.]+$').hasMatch(className)) {
    throw ArgumentError.value(className);
  }
  return _addedCryptoProvidersByClassName[className] ??=
      _methodChannel.invokeMethod(
    'androidCryptoProvidersAdd',
    className,
  );
}