パッケージ、リポジトリ、アプリカテゴリを検索

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

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

メールやSMSからOTPコードを入力または貼り付けるのに最適な、洗練されたカスタマイズ可能な検証コード入力フィールドを作成するためのFlutterパッケージです。フィールド間での自動フォーカス管理、ペースト検出、デバイス間でスムーズなユーザー体験をサポートしています。シンプルさと使いやすさを重視して設計されており、ワンタイムパスワードが必要な認証フローにシームレスに統合できます。

用途

  • ログイン時の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 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。