ar_captcha 1.1.6 copy "ar_captcha: ^1.1.6" to clipboard
ar_captcha: ^1.1.6 copied to clipboard

retracted

Flutter plugin for integrating ARCaptcha, providing a secure and customizable captcha solution for Android, IOS, Web apps.

ar_captcha #

A Flutter package to easily integrate ARCaptcha into your apps. It supports multiple display modes—dialog, screen, and modal bottom sheet—with a modern UI, smooth loader animations, and full customization options.

ARCaptcha is a privacy-friendly CAPTCHA solution designed to verify real users without intrusive challenges, providing a secure and user-friendly way to prevent bots and automated abuse. Ar Captcha pub.dev Package: https://pub.dev/packages/ar_captcha/ Official ARCaptcha service: https://arcaptcha.co/en/ #

Platform support: #

  • iOS
  • Web
  • Android

![ArCaptcha Demo]

ArCaptcha Light ArCaptcha Dark

Features #

  • ✅ Show captcha in Dialog, Screen, Modal Bottom Sheet, or Responsive Dialog
  • Built-in loading animation
  • Fully theme-aware (light/dark)
  • Customizable size, color, and behavior
  • Supports invisible and normal modes
  • Clean success/error callback system
  • Secure HTML + JS bridge with Flutter WebView
  • Responsive UI for desktop/tablet/mobile

Installation #

Add this to your pubspec.yaml:

dependencies:
  ar_captcha: ^last_version

Then run:

flutter pub get

Usage #

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

class MyCaptchaScreen extends StatelessWidget {
  final ArCaptchaController _controller = ArCaptchaController(
    lang: 'en',
    theme: ThemeMode.light,
    siteKey: 'YOUR_SITE_KEY',
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Captcha Example")),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            _controller.showCaptcha(
              context: context,
              mode: CaptchaType.dialog,
              onSuccess: (token) {
                print("Captcha success: $token");
              },
              onError: (error) {
                print("Captcha failed: $error");
              },
            );
          },
          child: const Text("Show Captcha"),
        ),
      ),
    );
  }
}

Captcha Display Modes #

  • CaptchaType.dialog
  • CaptchaType.screen
  • CaptchaType.modalBottomSheet
  • CaptchaType.responsiveDialog

Behavior Notes #

  • Dialog Mode

    • Fixed width & height
    • Good for desktop/tablet UX
  • Screen Mode

    • Full page captcha experience
  • Modal Bottom Sheet

    • Mobile-friendly UX
    • Uses custom bottom sheet wrapper
  • Responsive Dialog (NEW)

    • Automatically adapts to screen size
    • Uses maxResponsiveDialogWidth
    • Best default for mixed platforms
  • iOS Safari Web

    • The package automatically uses a Blob-backed iframe instead of srcdoc
    • Dialog-style modes are promoted to CaptchaType.screen to avoid Safari platform-view overlay issues

API Reference #

Parameter Type Description Default
siteKey String Your ARCaptcha public site key Required
lang String Language code (en, fa) en
domain String App domain used by captcha service localhost
theme ThemeMode Light or dark theme light
color Color Primary UI color Colors.black
dataSize DataSize normal or invisible mode normal
errorPrint int Show error messages (0/1) 0
captchaHeight double Height of captcha container 550
captchaWidth double Width (dialog mode only) 550
onErrorMessage String Default error message fallback string
dialogBarrierDismissible bool Allow closing dialog by tapping outside true
maxResponsiveDialogWidth double Max width for responsive dialog 600
2
likes
0
points
1.32k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for integrating ARCaptcha, providing a secure and customizable captcha solution for Android, IOS, Web apps.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, modal_bottom_sheet, web, webview_flutter

More

Packages that depend on ar_captcha