gesture_recognition_v2 0.0.6

SDKflutter
Platformandroidioswindowslinuxmacosweb

A gesture recognition verification lock. A total of nine points, slide to connect different points and return an array of numbers.

gesture_recognition_v2

Pub support

> A gesture recognition verification lock
> [gesture_recognition](https://pub.dev/packages/gesture_recognition) Enhanced Edition

中文 English

Dependencies

dependencies:
  gesture_recognition_v2: ^version  

Demonstration

Example

Settings PassWord
GestureView(
	immediatelyClear: true,
	size: MediaQuery.of(context).size.width,
	onPanUp: (List<int> items) {
	  setState(() {
	    result = items;
	  });
	},
)
Verify PassWord
GlobalKey<GestureState> gestureStateKey = GlobalKey();

GestureView(
    key: this.gestureStateKey,
    size: MediaQuery.of(context).size.width*0.8,
    selectColor: Colors.blue,
    onPanUp: (List<int> items) {
      analysisGesture(items);
    },
    onPanDown: () {
      gestureStateKey.currentState.selectColor = Colors.blue;
      setState(() {
        status = 0;
      });
    },
)

Parameter

PropsTypeDescriptionDefaultValueisRequired
sizedoubleThe size of the component, the width is equal to the heighttrue
selectColorColorThe color when selectedColors.bluefalse
unSelectColorColorColor when not selectedColors.greyfalse
ringWidthdoubleOuter ring width of the point4false
ringRadiusdoubleInner ring radius of the point30false
showUnSelectRingboolWhether the outer ring is displayed when the point is not selectedtruefalse
circleRadiusdoubleInner radius of the point20false
lineWidthdoubleConnection line width6false
onPanUpFunction(List)After the finger is raisedfalse
onPanDownFunction()After pressing your fingerfalse
immediatelyClearboolClear the trace after lifting the handfalsefalse
forceConsecutiveDotsboolForced continuous connectionfalsefalse