WNLockWidget constructor

const WNLockWidget({
  1. Key? key,
  2. required LockController controller,
  3. double width = 100,
  4. double height = 100,
  5. ValueChanged<List<int>>? onPanEnd,
  6. int row = 3,
  7. int column = 3,
  8. Attr? attr,
  9. double touchInChildScale = 1,
  10. EdgeInsets? padding,
  11. EdgeInsets? margin,
  12. Color? lineColor,
  13. 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);