PatternLock constructor
const
PatternLock({
- Key? key,
- required int width,
- required int height,
- required void onEntered(),
- Duration animationDuration = const Duration(milliseconds: 250),
- PatternLockCellActivationArea cellActivationArea = const PatternLockCellActivationArea(dimension: .7, units: PatternLockCellAreaUnits.relative, shape: PatternLockCellAreaShape.square),
- PatternLockLinkageSettings linkageSettings = const PatternLockLinkageSettings(allowRepetitions: false, maxLinkDistance: 1),
- Widget cellBuilder(
- BuildContext context,
- int position,
- double anim
- void onUpdate()?,
- PatternLockLineAppearance lineAppearance = const PatternLockLineAppearance(color: Colors.blue, width: 5.0),
- bool hapticFeedback = true,
Implementation
const PatternLock({
Key? key,
required this.width,
required this.height,
required this.onEntered,
this.animationDuration = const Duration(milliseconds: 250),
this.cellActivationArea = const PatternLockCellActivationArea(
dimension: .7,
units: PatternLockCellAreaUnits.relative,
shape: PatternLockCellAreaShape.square,
),
this.linkageSettings = const PatternLockLinkageSettings(
allowRepetitions: false,
maxLinkDistance: 1,
),
this.cellBuilder,
this.onUpdate,
this.lineAppearance = const PatternLockLineAppearance(
color: Colors.blue,
width: 5.0,
),
this.hapticFeedback = true,
}) : assert(
width > 0 && height > 0,
'Both width and height must be not less than 1',
),
super(key: key);