Skip to content

Create Google reCAPTCHA v3 token for Flutter app. Google reCAPTCHA v3 plugin for Flutter. A Google reCAPTCHA is a free service that protects your website from spam and abuse.

License

Notifications You must be signed in to change notification settings

YeMyoAung/flutter_google_recaptcha_v3

Repository files navigation

flutter_google_recaptcha_v3

Create Google reCAPTCHA v3 token for Flutter app. Google reCAPTCHA v3 plugin for Flutter. A Google reCAPTCHA is a free service that protects your website from spam and abuse.

Pub MIT License

Preview

Installation

Add flutter_google_recaptcha_v3 as dependency to your pubspec file.

   flutter_google_recaptcha_v3:
    git:
      url: https://github.com/YeMyoAung/flutter_google_recaptcha_v3.git

Setup

for Android

Update minSdkVersion in app level build.gradle.

defaultConfig {
        applicationId "YOUR_APP_ID"
        minSdkVersion 21 //<-- this line
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
}

Usage

First of all you need to import our package.

import 'package:flutter_google_recaptcha_v3/google_recaptcha_v3.dart';

And then you can use easily.

Create A RecaptchaController

You can create a controller invoking RecaptchaController. RecaptchaController take 2 parameters.First on is apiKey and second one is optional hostName.

    final RecaptchaController controller = RecaptchaController(
          'YOUR_API_KEY',
          hostName: 'YOUR_HOST_NAME',
    );

And then invoke getRecaptcha

getRecaptcha will take BuildContext and then give you nullable RecaptchaModel.

    final RecaptchaModel? model = await controller.getRecaptcha(context);

Contact Us

Starlight Studio

About

Create Google reCAPTCHA v3 token for Flutter app. Google reCAPTCHA v3 plugin for Flutter. A Google reCAPTCHA is a free service that protects your website from spam and abuse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published