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

pattern_lock 封面
插件详情v2.0.0

pattern_lock

作为 Flutter 小部件的图案锁。可自定义且易于使用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
5180
喜欢数
39
Pub 分数
160

安装插件

flutter pub add pattern_lock

插件介绍

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

一个可自定义的 Flutter 小部件,实现了图案解锁界面,允许用户在网格上绘制图案以解锁或进行身份验证。设计简洁,易于集成,支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台。该小部件非常适合需要安全本地认证且采用熟悉手势输入方式的应用程序。它在保持流畅用户体验的同时,提供了灵活的样式和行为自定义选项。

适合场景

  • 移动应用中的用户身份验证
  • 对敏感功能的安全访问
  • 基于手势的登录,用于注重隐私的应用程序
  • 集成到入职流程中
  • 可定制的解锁界面
  • 多平台应用程序安全

主要特点

  • 基于手势的模式输入
  • 高度可定制的外观
  • 跨平台兼容性
  • 简单 API 用于集成
  • 支持动画和反馈
  • 可配置的网格大小和颜色

适合对象

  • 开发安全的本地身份验证
  • 需要直观解锁机制的应用程序
  • 针对多个平台的项目
  • 寻求交互式小部件的UI设计师
  • 原型化生物特征类界面

使用建议

  • 可能不适合高安全环境
  • 模式强度取决于用户选择
  • 与PIN码或生物识别相比,可访问性有限
  • 需要仔细的用户体验设计,以避免用户沮丧
  • 在没有额外保护措施的情况下,不建议用于关键安全场景

原始 README

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

Pattern Lock

pub package

Pattern Lock as Flutter widget.

Demo web-site.

Demo

Usage

PatternLock(
  // color of selected points.
  selectedColor: Colors.red,
  // radius of points.
  pointRadius: 8,
  // whether show user's input and highlight selected points.
  showInput: true,
  // count of points horizontally and vertically.
  dimension: 3,
  // padding of points area relative to distance between points.
  relativePadding: 0.7,
  // needed distance from input to point to select point.
  selectThreshold: 25,
  // whether fill points.
  fillPoints: true,
  // callback that called when user's input complete. Called if user selected one or more points.
  onInputComplete: (List<int> input) {
    print("pattern is $input");
  },
);

Example

Example app with pattern setting and checking can be found here.

Screenshots

所属分类

源码仓库

使用此插件的项目