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

flutter_pin_code_widget 封面
插件详情v0.1.2

flutter_pin_code_widget

用于创建和检查本地PIN码的PIN码小部件,支持灵活设置。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
451
喜欢数
27
Pub 分数
160

安装插件

flutter pub add flutter_pin_code_widget

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个可自定义的 Flutter 小部件,用于创建和验证本地 PIN 码,具有灵活的配置选项。专为跨多个平台的安全、用户友好的 PIN 输入设计,支持动态输入长度、样式和验证逻辑。适用于需要简单数字代码的身份验证流程。该小部件轻量且可无缝集成到需要基于 PIN 的访问控制的应用程序中。

适合场景

  • 用户认证
  • 应用锁功能
  • 安全的数据访问
  • 双因素验证
  • PIN 设置流程
  • 设备解锁

主要特点

  • 可自定义输入长度
  • 灵活的样式选项
  • 本地PIN验证
  • 跨平台支持
  • 轻松集成
  • 屏幕键盘处理

适合对象

  • 简单的认证系统
  • 移动应用安全
  • 基于PIN的登录屏幕
  • 注重隐私的应用程序
  • 寻求轻量级解决方案的开发者

使用建议

  • 不支持基于云的PIN存储
  • 仅限数字输入
  • 无内置生物识别备用方案
  • 需要手动实现重试逻辑
  • 在没有额外措施的情况下,不适用于高安全环境

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

  • A Flutter package that helps create a PIN Code screens.
  • Inspired by Android PIN code screen/
  • Widget can use PIN with any length (video below)

Note, that the widget has centerBottomWidget property, for adding one more button on the bottom left.

Usage

  PinCodeWidget(
    minPinLength: 4,
    maxPinLength: 25,
    onChangedPin: (pin) {
      // check the PIN length and check different PINs with 4,5.. length.
    },
    onEnter: (pin, _) {
      // callback user pressed enter
    },
    centerBottomWidget: IconButton(
      icon: const Icon(
        Icons.fingerprint,
        size: 40,
      ),
      onPressed: () {},
    ),
  ),
  1. Full example is here https://github.com/AgoraDesk-LocalMonero/flutter-pin-code-widget/blob/main/example/lib/main.dart
  2. How this package used in the real app https://github.com/AgoraDesk-LocalMonero/agoradesk-app-foss/blob/main/lib/features/auth/screens/pin_code_set_screen.dart

Showcase

Example app

Showcase|width=400px

App from the stores https://agoradesk.com/, the code is here code https://github.com/AgoraDesk-LocalMonero/agoradesk-app-foss/blob/main/lib/features/auth/screens/pin_code_set_screen.dart

Showcase|width=400px

Credits

This is a project by Agoradesk, P2P cryptocurrency trading platform. Created by the team behind LocalMonero, the biggest and most trusted Monero P2P trading platform.

所属分类

源码仓库

使用此插件的项目