gesture_recognition

Pub support

a gesture recognition verification lock

中文 English

Dependencies

dependencies:
  gesture_recognition: ^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

Libraries

gesture_view
line_view
point
point_view