pattern_dots 0.0.5 pattern_dots: ^0.0.5 copied to clipboard
A pattern lock UI using flutter, bring android pattern lock style and fully ability to customize.
pattern_dots #
A pattern lock UI using flutter.
USAGE #
PatternLockStyle _lockStyle = PatternLockStyle.normal;
...
PatternStyle(
data: PatternStyleData(
width: 4,
tapRange: 24,
),
child: PatternView(
lockStyle: _lockStyle,
onTapDown: () {
_lockStyle = PatternLockStyle.normal;
setState(() {});
},
onComplete: (cells) {
bool same = listEquals(cells, [0, 4, 5, 8]);
_lockStyle = same ? PatternLockStyle.success : PatternLockStyle.failed;
setState(() {});
},
),
);
...