cloudflare_turnstile 2.0.0 copy "cloudflare_turnstile: ^2.0.0" to clipboard
cloudflare_turnstile: ^2.0.0 copied to clipboard

A free CAPTCHAs alternative to enhance security and protect against bots.

Flutter Cloudflare Turnstile Pub #

Cloudflare turnstile is a free CAPTCHAs Alternative, Turnstile delivers frustration-free, CAPTCHA-free web experiences to website visitors - with just a simple snippet of free code. Moreover, Turnstile stops abuse and confirms visitors are real without the data privacy concerns or awful user experience of CAPTCHAs.

Preview

⚠️ NOTE #

This package is unofficial and not endorsed by Cloudflare. Use it at your own discretion.

Installation #

flutter pub add cloudflare_turnstile

Example #

Here`s a quick example that show how to add Cloudflare Turnstile widget to your flutter app

import 'package:flutter/material.dart';
import 'package:cloudflare_turnstile/cloudflare_turnstile.dart';

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Turnstile(
          siteKey: '3x00000000000000000000FF', //Change with your site key
          baseUrl: 'http://localhost/',
          mode: TurnstileMode.managed,
          onTokenRecived: (token) {
            print(token);
          },
        ),
      ),
    );
  }
}

For Android and iOS platforms you need to provide the baseUrl parameter with the actual URL of your Turnstile Widget Domans list. baseUrl is must be a same as list of domains when creating a Widget.

Configure Turnstile Widget #

final TurnstileOptions options = const TurnstileOptions(
  size: TurnstileSize.normal,
  theme: TurnstileTheme.light,
  language: 'ar',
  retryAutomatically: false,
  refreshTimeout: TurnstileRefreshTimeout.manual,
);

//...

Turnstile(
  sitekey: '3x00000000000000000000FF',
  options: options,
  mode: TurnstileMode.managed,
);

Contribution #

Your contributions are welcome and greatly valued! If you have ideas, suggestions, or improvements, feel free to open an issue or submit a pull request. Every bit of help is appreciated, and your input can make a big difference. Just ensure your contributions fit with the project's goals and guidelines.

License #

This project is licensed under the MIT License - see the LICENSE.md file for details.

14
likes
0
pub points
85%
popularity

Publisher

unverified uploader

A free CAPTCHAs alternative to enhance security and protect against bots.

Repository (GitHub)
View/report issues

Topics

#hcaptcha #recaptcha #cloudflare-turnstile

License

unknown (license)

Dependencies

flutter, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on cloudflare_turnstile