WNLockWidget constructor
const
WNLockWidget({
- Key? key,
- required LockController controller,
- double width = 100,
- double height = 100,
- ValueChanged<
List< ? onPanEnd,int> > - int row = 3,
- int column = 3,
- Attr? attr,
- double touchInChildScale = 1,
- EdgeInsets? padding,
- EdgeInsets? margin,
- Color? lineColor,
- double? lineWidth,
每个Child平分后占据的空间比例 以row数值作为平分点 平分空间后所占各空间比例
Implementation
// todo item 按照比例绘制
// final double eachInParentScale;
const WNLockWidget({
Key? key,
required this.controller,
this.width = 100,
this.height = 100,
this.onPanEnd,
this.row = 3,
this.column = 3,
this.attr,
this.touchInChildScale = 1,
this.padding,
this.margin,
this.lineColor,
this.lineWidth,
// this.eachInParentScale = 0.5,
}) : assert(touchInChildScale > 0 && touchInChildScale <= 1,
"touchInWidgetScale only approve (0,1]"),
// assert(eachInParentScale > 0 && eachInParentScale <= 1, "eachInParentScale only approve (0,1]"),
assert(row > 0 && row <= 9, "row only approve (0,9]"),
assert(column > 0 && column <= 9, "column only approve (0,9]"),
super(key: key);