LiveInkWell class

An InkWell that triggers ActionCells on gestures.

Rather than calling a callback function when a gesture is detected, an ActionCell is triggered. The arguments tap, doubleTap, longPress, tapCancel, secondaryTap, secondaryTapCancel correspond to the onTap, onDoubleTap, onLongPress, onTapCancel, onSecondaryTap and onSecondaryTapCancel arguments of the default constructor of InkWell.

The arguments tapUp, tapDown, secondaryTapUp, secondaryTapDown take MetaCells that hold the details of the last tap up/tap down event. These correspond to the onTapUp, onTapDown, onSecondaryTapUp, onSecondaryTapDown arguments of the default constructor of InkWell.

The enabled cell controls whether the widget can be tapped (true) or not (false).

highlighted is a MetaCell that holds the value true when the widget is being highlighted and false otherwise. This corresponds to the onHighlight argument of InkWell's default constructor.

hovered is a MetaCell that holds the value true when the widget is being hovered over and false otherwise. This corresponds to the onHover argument of InkWell's default constructor.

focussed is a MetaCell that holds the value true when the widget is in focus and false otherwise. This corresponds to the onFocus argument of InkWell's default constructor.

Inheritance

Constructors

LiveInkWell.new({Key? key, ValueCell<bool> enabled = const ValueCell.value(true), ActionCell? tap, ActionCell? doubleTap, ActionCell? longPress, ActionCell? tapCancel, MetaCell<TapDownDetails>? tapDown, MetaCell<TapUpDetails>? tapUp, ActionCell? secondaryTap, ActionCell? secondaryTapCancel, MetaCell<TapDownDetails>? secondaryTapDown, MetaCell<TapUpDetails>? secondaryTapUp, MetaCell<bool>? highlighted, MetaCell<bool>? hovered, MetaCell<bool>? focussed, Widget? child, MouseCursor? mouseCursor, Color? focusColor, Color? hoverColor, Color? highlightColor, WidgetStateProperty<Color?>? overlayColor, Color? splashColor, InteractiveInkFeatureFactory? splashFactory, double? radius, BorderRadius? borderRadius, ShapeBorder? customBorder, bool enableFeedback = true, bool excludeFromSemantics = false, FocusNode? focusNode, bool canRequestFocus = true, bool autofocus = false, WidgetStatesController? statesController})
const

Properties

autofocus bool
final
borderRadius BorderRadius?
final
canRequestFocus bool
final
child Widget?
final
customBorder ShapeBorder?
final
doubleTap ActionCell?
Action cell triggered on a double tap
final
enabled ValueCell<bool>
Is the widget enabled for user input?
final
enableFeedback bool
final
excludeFromSemantics bool
final
focusColor Color?
final
focusNode FocusNode?
final
focussed MetaCell<bool>?
Meta cell that is true when the widget is in focus.
final
hashCode int
The hash code for this object.
no setterinherited
highlightColor Color?
final
highlighted MetaCell<bool>?
Meta cell that is true when the widget is highlighted.
final
hoverColor Color?
final
hovered MetaCell<bool>?
Meta cell that is true when hovering over the widget.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
longPress ActionCell?
Action cell triggered when the widget is long pressed
final
mouseCursor MouseCursor?
final
overlayColor WidgetStateProperty<Color?>?
final
radius double?
final
restorationId String?
Restoration ID to use for restoring the cell state
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryTap ActionCell?
Action cell triggered on a secondary tap event
final
secondaryTapCancel ActionCell?
Action cell triggered when a secondary tap is cancelled
final
secondaryTapDown MetaCell<TapDownDetails>?
Meta cell holding the details of the last secondary tap down event
final
secondaryTapUp MetaCell<TapUpDetails>?
Meta cell holding the details of the last secondary tap up event
final
splashColor Color?
final
splashFactory InteractiveInkFeatureFactory?
final
statesController WidgetStatesController?
final
tap ActionCell?
Action cell triggered when the widget is tapped
final
tapCancel ActionCell?
Action cell triggered when a tap is cancelled
final
tapDown MetaCell<TapDownDetails>?
Meta cell holding the details of the last tap down event
final
tapUp MetaCell<TapUpDetails>?
Meta cell holding the details of the last tap up event
final

Methods

build(BuildContext context) Widget
Build the widget underneath this widget in the tree
inherited
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CellWidget>
Creates the mutable state for this widget at a given 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, 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