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

flutter_verification_code_field 표지
패키지 상세v1.2.2

flutter_verification_code_field

Flutter 인증 코드 입력. 주로 인증 이메일이나 메시지에서 OTP 코드를 입력하거나 붙여넣는 데 사용됩니다.

AndroidiOS
30일 다운로드
96
좋아요
27
Pub 점수
160

패키지 설치

flutter pub add flutter_verification_code_field

패키지 개요

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

이메일 또는 문자 메시지에서 OTP 코드를 입력하거나 붙여넣는 데 이상적인 깔끔하고 사용자 정의 가능한 인증 코드 입력 필드를 생성하기 위한 플러터 패키지입니다. 필드 간 자동 포커스 관리, 붙여넣기 감지 및 다양한 기기에서 원활한 사용자 경험을 지원합니다. 단순성과 사용 편의성을 고려하여 설계되었으며, 일회용 비밀번호가 필요한 인증 프로세스에 자연스럽게 통합됩니다.

사용 사례

  • 로그인 중 OTP 입력
  • 이중 인증
  • 이메일/SMS를 통한 계정 확인
  • 비밀번호 없는 로그인
  • 6자리 코드를 위한 폼 검증
  • 모바일 앱 온보딩

주요 기능

  • 코드 필드 간 자동 포커스
  • 클립보드에서의 붙여넣기 감지
  • 사용자 정의 스타일
  • 모든 화면 크기에 대응하는 반응형 디자인
  • Android 및 iOS 둘 다 지원
  • 폼 컨트롤러와의 간편한 통합

적합한 대상

  • 인증 흐름을 구축하는 개발자
  • OTP 입력이 필요한 앱
  • 사용자 경험 중심의 모바일 애플리케이션
  • 코드 필드에 최소한의 설정이 필요한 프로젝트
  • 접근성과 사용성을 우선시하는 팀

고려 사항

  • 검증 로직을 수동으로 처리해야 합니다
  • 단일 줄 숫자 입력에 제한
  • 동적 필드 수에 대한 내장 지원 없음
  • 기본이 아닌 테마에 대해 추가 스타일링이 필요할 수 있습니다
  • 다중 단계 검증 워크플로우에 적합하지 않습니다

원본 README

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

Flutter Verification Code Field

A flutter package which contains a verification code field with a number of advantages, namely with the ability to customize your own validation pattern, customize the number of OTP fields or their size, as well as the spacing between OTP fields, also supports text insertion or character replacement in any cell.


Platform


Table of contents

Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_verification_code_field: ^1.0.0
2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get
3. Import it

Now in your Dart code, you can use:

import 'package:flutter_verification_code_field/flutter_verification_code_field.dart';

Usage

VerificationCodeField is a Hook Widget that can be used for OTP verification. Include it in your code like:

    VerificationCodeField(
      length: 5,
      onFilled: (value) => print(value),
      size: Size(30, 60),
      spaceBetween: 16,
      matchingPattern: RegExp(r'^\d+$'),
    );

It has many configurable properties, including:

  • length – Number of the OTP Fields
  • size – Size of the single OTP Field
  • spaceBetween – Space between the OTP fields
  • matchingPattern – Pattern for validation

There are also custom callback:

  • onFilled – Callback function that is called when the verification code is filled

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

카테고리

의존성

의존성 목록 2 개

소스 저장소

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

아직 데이터가 없습니다.