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

passwordgrid 封面
插件详情v0.0.1

passwordgrid

用于生成密码网格的 Flutter 包。此包支持 iOS、Android、MacOS 和 Web。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
12
喜欢数
1
Pub 分数
150

安装插件

flutter pub add passwordgrid

插件介绍

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

PasswordGrid 是一个 Flutter 包,可帮助开发者创建用于用户身份验证的安全、可自定义的密码网格。它支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台,非常适合需要基于网格的密码输入的跨平台应用。该包提供了一个直观的界面,通过网格布局输入密码,既提升了易用性又保证了安全性。它与 Flutter 的 widget 系统无缝集成,可轻松自定义以匹配应用的设计需求。

适合场景

  • 安全的登录界面
  • 双因素认证
  • 基于网格的密码输入
  • 跨平台应用开发
  • 用户友好的身份验证
  • 可自定义的密码输入UI

主要特点

  • 跨平台支持
  • 可自定义的网格布局
  • 安全密码输入
  • 与 Flutter 的轻松集成
  • 响应式设计
  • 支持多个操作系统

适合对象

  • 移动和网页应用
  • 认证系统
  • 注重安全的应用程序
  • 寻求可重用 UI 组件的开发者
  • 需要基于网格输入的应用程序
  • 多平台项目

使用建议

  • 需要谨慎处理敏感数据
  • 可能需要额外的验证逻辑
  • 不适用于复杂的密码策略
  • UI 自定义可能需要高级的 Flutter 知识
  • 仅限网格样式密码输入
  • 依赖外部源代码以获取更新

原始 README

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

PasswordGrid

A Flutter Package to Generate Password Grid. You can use this widget directly in your application UI.

Stay Secure with 2FA Passcode Grid

A password grid, also called a "passcode grid," is a table with rows and columns containing unique letters or numbers where you select specific combinations to authenticate, essentially acting as a visual password by choosing specific coordinates on the grid to form your login credentials; to use it, you would typically be presented with a grid, then asked to enter the letters or numbers from specific grid positions (like "A3, B2, C1") to log in, usually requiring you to save or print the grid for future use as it's unique to your account.

Key points about using a password grid:

Access your grid:

While designing a authentication system, you can ask your users to enter the values in the Password grid as a 2FA passcode. The user will be prompted to access your grid, which you should generate and show them. The password grid can be generated at the time of user signin and they should save it for future use. so that the user can use the grid for 2FA authentication.

Select coordinates:

The system will ask the user to enter the letters or numbers from specific grid positions, usually indicated by a combination of a column letter and row number (e.g., "B2", A8, etc).

Enter the code:

The user will enter the values from the requested grid coordinates into the 2FA login field to authenticate.

Benefits of a password grid:

Enhanced security:

Since the user selects multiple characters from a grid, it's harder for someone to guess your password compared to a simple text-based password.

Shoulder surfing resistant:

Less susceptible to "shoulder surfing" attacks where someone observes your password entry because the grid doesn't reveal the exact password sequence.

Accessibility for some users:

Can be easier for people who struggle with remembering complex passwords.

Usage

In your application,

import 'package:passwordgrid/main.dart';

then pass grid configuration

GridConfig config = GridConfig(
  numbers: true,
  alphaUpper: true,
  alphaLower: true,
  symbols: false,
  gridSize: 8, // max size is 8 and min size is 5
);
// or Optionally pass GridConfig or use default values
GridConfig? config;

// and invoke this
PasswordGrid passwordGrid = PasswordGrid(config: config);

// sample code
  @override
  Widget build(BuildContext context) {
    // pass grid configuration
    GridConfig config = GridConfig(
      numbers: true,
      alphaUpper: true,
      alphaLower: true,
      symbols: false,
      gridSize: 8, // max size is 8 and min size is 5
    );
    // or Optionally pass GridConfig or use default values
    // GridConfig? config;

    PasswordGrid passwordGrid = PasswordGrid(config: config);
    return Scaffold(
      appBar: AppBar(
        title: Text('Password Grid Example'),
        backgroundColor: Colors.green,
        centerTitle: true,
        titleTextStyle: TextStyle(
          color: Colors.white,
          fontSize: 24,
        ),
      ),
      body: Center(
        child: passwordGrid,
      ),
    );
  }

An example application of how to use this password grid package is included in the example folder.

This will generate a password grid similar to

Grid Configuration

While generating grid, you can configure the grid generation parameters.

  GridConfig config = GridConfig(
    numbers: false,
    alphaUpper: true,
    alphaLower: true,
    symbols: false,
    gridSize: 6, // max size is 8 and min size is 5
  );

If everything is set to false as below, then it is invalid, so grid parameters will be set to default. i.e., all falsg will be set to true

  GridConfig config = GridConfig(
    numbers: false,
    alphaUpper: false,
    alphaLower: false,
    symbols: false,
    gridSize: 6,
  );

所属分类

源码仓库

使用此插件的项目

暂无相关数据。