搜索插件、代码仓与 APP 分类

GitHub 代码仓otakoyi/flutter_verification_code_field

flutter_verification_code_field

otakoyi/flutter_verification_code_field open-source repository details.

flutter_verification_code_field 项目封面
星标
5
复刻
1
最近推送(UTC)
2025年2月24日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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.

otakoyi GitHub avatar
GitHub 作者

otakoyi ↗

语言DartC++CMakeHTMLSwiftCKotlinObjective-C

此仓库发布的插件

使用的依赖

依赖清单 5 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗