PatternLock class

Inheritance

Constructors

PatternLock({Key? key, required int width, required int height, required void onEntered(List<int> result), 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(List<int> current)?, PatternLockLineAppearance lineAppearance = const PatternLockLineAppearance(color: Colors.blue, width: 5.0), bool hapticFeedback = true})
const

Properties

animationDuration Duration
Animation duration for appearing and disappearing cells and links.
final
cellActivationArea PatternLockCellActivationArea
See PatternLockCellActivationArea
final
cellBuilder Widget Function(BuildContext context, int position, double anim)?
Optional builder for each of width * height cells. position is cell's position in the grid, counting left to right, top to bottom, * starting from 1 *.
final
hapticFeedback bool
Whether to do HapticFeedback on cell activation.
final
hashCode int
The hash code for this object.
no setterinherited
height int
Height of pattern lock. In cells.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineAppearance PatternLockLineAppearance
See PatternLockLineAppearance
final
linkageSettings PatternLockLinkageSettings
See PatternLockLinkageSettings
final
onEntered → void Function(List<int> result)
Called when pointer is gone and length of result is greater than minPatternLength (i.e. called only when done on valid inputs).
final
onUpdate → void Function(List<int> current)?
Called for every update. current is the sequence so far.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
Width of pattern lock. In cells.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() PatternLockState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited