FLUTTER ECOSYSTEM

qwert2603/pattern_lock

作为 Flutter 小部件的图案锁!

pattern_lock 项目封面
Stars
18
Forks
10
最近推送(UTC)
2023年6月10日
项目状态
未归档
Alexander Zhdanov GitHub avatar
GITHUB User

Alexander Zhdanov ↗

Android Developer

Earth
语言DartHTMLSwiftKotlinShellObjective-C

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

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

展开 / 收起项目 README

Pattern Lock

pub package

Pattern Lock as Flutter widget.

Demo web-site.

Demo

https://github.com/qwert2603/pattern_lock/blob/master/art/device20190613185830.gif

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

https://github.com/qwert2603/pattern_lock/blob/master/art/demo.png