execute static method

Future<String?> execute(
  1. String action
)

use GRecaptchaV3 not ~GRecaptchaV3PlatformInterace~

Implementation

static Future<String?> execute(String action) async {
  if (!kIsWeb) return null;
  if (":$_gRecaptchaV3Key" == ':undefined') {
    throw Exception('gRecaptcha V3 key not set : Try calling ready() first.');
  }
  try {
    String? result = await js_util.promiseToFuture<String>(
        await _execute(_gRecaptchaV3Key, _Options(action: action)));
    return result;
  } catch (e) {
    debugPrint(e.toString());
    // Error: No reCAPTCHA clients exist.
    return null;
  }
}