패키지, 저장소 및 앱 카테고리 검색

omjo_captcha 표지
패키지 상세v0.0.10

omjo_captcha

랜덤한 색상의 문자와 선을 가진 사용자 정의 가능한 텍스트 기반 CAPTCHA 위젯입니다. 백엔드가 필요하지 않습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
21
좋아요
2
Pub 점수
160

패키지 설치

flutter pub add omjo_captcha

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

omjo_captcha는 백엔드가 필요 없이 사용자 정의 가능한 텍스트 기반 CAPTCHA를 제공하는 Flutter 위젯입니다. 랜덤한 색상의 문자와 장식적인 선을 생성하여 봇이 자동으로 폼을 제출하는 것을 방지합니다. 간단하고 통합하기 쉬운 설계로, 사용자 인증이 필요한 폼에 자연스럽게 통합됩니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다.

사용 사례

  • 폼 스팸 보호
  • 로그인/가입 흐름에서의 사용자 인증
  • 웹 및 모바일 앱에서의 봇 탐지
  • 간단한 전면 전용 CAPTCHA 솔루션
  • 공개형 양식의 보안 강화

주요 기능

  • 사용자 정의 가능한 캐릭터 색상 및 스타일
  • 랜덤 텍스트 및 라인 패턴
  • 백엔드 종속 없음
  • 크로스 플랫폼 호환성
  • Flutter 폼과의 간편한 통합
  • 사용자 정의 가능한 난이도 레벨

적합한 대상

  • 경량 CAPTCHA가 필요한 개발자
  • 엄격한 개인정보 보호 요구 사항을 가진 프로젝트
  • 프론트엔드 전용 보안 구현
  • 모바일 및 웹 애플리케이션
  • 빠른 CAPTCHA 설정이 필요한 프로토타입 또는 MVP

고려 사항

  • 고보안 환경에는 적합하지 않습니다
  • 시각적 패턴 인식에 국한됨
  • 접근성 조정이 필요할 수 있습니다
  • 클라이언트 측 무작위성에 의존
  • 음성 또는 이미지 기반의 CAPTCHA를 지원하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

omjo_captcha

pub package

A customizable, client-side CAPTCHA widget for Flutter with randomized colorful characters and noise lines.
No backend required — perfect for login forms, guestbooks, or simple human verification needs.


Captcha Screenshot


✨ Features

  • 🎨 Randomized colored characters
  • 🔀 Noise/disturbance lines for bot resistance
  • 🔄 Easy CAPTCHA refresh
  • ✅ Custom validation logic
  • 🚫 Works entirely offline (no server needed)

🌐 Live Demo

🧪 Try it directly in your browser (no installation needed):
👉 https://omjocaptcha.netlify.app


📦 Installation

Add this to your pubspec.yaml:

dependencies:
  omjo_captcha: ^0.0.1

Then run:

flutter pub get

🚀 Usage

Here's a simple example:

import 'package:flutter/material.dart';
import 'package:omjo_captcha/omjo_captcha.dart';
import 'dart:math';

class CaptchaPreview extends StatefulWidget {
  const CaptchaPreview({super.key});

  @override
  State<CaptchaPreview> createState() => _CaptchaPreviewState();
}

class _CaptchaPreviewState extends State<CaptchaPreview> {
  late List<CaptchaChar> characters;
  late List<CaptchaLine> lines;

  @override
  void initState() {
    super.initState();
    _generateCaptcha();
  }

  void _generateCaptcha() {
    final random = Random();
    const text = 'A7B2X';

    characters = text.split('').map((char) {
      return CaptchaChar(
        char: char,
        color: _randomColor(random),
        yOffset: 10 + random.nextDouble() * 10,
        rotation: (random.nextDouble() - 0.5) * 0.3,
      );
    }).toList();

    lines = List.generate(5, (_) {
      return CaptchaLine(
        start: Offset(random.nextDouble() * 120, random.nextDouble() * 50),
        end: Offset(random.nextDouble() * 120, random.nextDouble() * 50),
        color: _randomColor(random),
      );
    });

    setState(() {});
  }

  Color _randomColor(Random random) {
    return Color.fromARGB(
      255,
      100 + random.nextInt(156),
      100 + random.nextInt(156),
      100 + random.nextInt(156),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        CustomPaint(
          size: const Size(150, 50),
          painter: CaptchaPainter(characters, lines),
        ),
        const SizedBox(height: 10),
        ElevatedButton(
          onPressed: _generateCaptcha,
          child: const Text('Refresh Captcha'),
        ),
      ],
    );
  }
}

📁 Folder Structure

lib/
├── omjo_captcha.dart
└── src/
    ├── captcha_painter.dart
    ├── models/
    │   ├── captcha_char.dart
    │   └── captcha_line.dart

🧪 Example App

Clone this repo and run the example:

cd example
flutter run

💡 Tips

  • You can wrap this CAPTCHA in a TextFormField widget for login forms.
  • Combine with your auth logic to validate user input against captchaText.

🛠️ Contributing

Contributions are welcome!
If you found a bug or want a new feature, please open an issue or submit a pull request.


Support the Project

If you find this plugin helpful, consider supporting its development:

  • Buy Me a Coffee

Your support is greatly appreciated!


📄 License

MIT © Abu Khoerul Iskandar Ali (Omjo)
See LICENSE for details.


🙌 Credits

Built with 💙 using Flutter.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.