InputOverlay class

Builds GestureDetectors for each square on the board, handling some common gestures such as right clicks, long presses etc. Doesn't include everything that GestureDetector supports because it has literally 60+ parameters. It's easy enough to add more if you need them, and if you think one is a common enough use case, feel free to make a PR.

Note that this can't support onTap because it will interfere with the standard piece drag behaviour. Also note that gestures like long press will make tap responses on the pieces and squares take longer to respond as the gestures have to go through this first.

Inheritance

Constructors

InputOverlay({Key? key, required int orientation, BoardSize size = BoardSize.standard, void onSecondaryTap(int i)?, void onSecondaryTapDown(int i, TapDownDetails details)?, void onSecondaryTapUp(int i, TapUpDetails details)?, void onSecondaryTapCancel(int i)?, void onLongPress(int i)?, void onLongPressStart(int i, LongPressStartDetails details)?, void onLongPressMoveUpdate(int i, LongPressMoveUpdateDetails details)?, void onLongPressEnd(int i, LongPressEndDetails details)?, void onLongPressUp(int i)?, void onDoubleTap(int i)?})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDoubleTap → (void Function(int i)?)
final
onLongPress → (void Function(int i)?)
final
onLongPressEnd → (void Function(int i, LongPressEndDetails details)?)
final
onLongPressMoveUpdate → (void Function(int i, LongPressMoveUpdateDetails details)?)
final
onLongPressStart → (void Function(int i, LongPressStartDetails details)?)
final
onLongPressUp → (void Function(int i)?)
final
onSecondaryTap → (void Function(int i)?)
final
onSecondaryTapCancel → (void Function(int i)?)
final
onSecondaryTapDown → (void Function(int i, TapDownDetails details)?)
final
onSecondaryTapUp → (void Function(int i, TapUpDetails details)?)
final
orientation int
The orientation that the board is being viewed from.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size BoardSize
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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}) 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