CrossButton class

It's a button that can be selected, deselected, and changed color

Inheritance

Constructors

CrossButton({required GlobalKey<CrossButtonState> globalKey, required Pair<int, int> position, required GlobalKey<ShakeWidgetState> shakeKey, required List<GlobalKey<BlinkWidgetState>> shakeKeyColors, required ValueNotifier<SelectionModes> selectionMode, required ValueNotifier<List<CrossButton>> coloredButtons, required ValueNotifier<List<CrossButton>> selectedButtons, required List<Row> buttons, required ResultNotifier resultValueNotifier})
It's the constructor of the class.
const

Properties

buttons → List<Row>
It's a list of rows that are used to access the buttons in the grid.
final
coloredButtons → ValueNotifier<List<CrossButton>>
Creating a list of CrossButton objects.
final
globalKey → GlobalKey<CrossButtonState>
It's a way to access the state of the button from outside the widget.
final
hashCode → int
The hash code for this object.
read-onlyinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
position → Pair<int, int>
It's the coordinate of the button in form (y,x)
final
resultValueNotifier → ResultNotifier
A variable that is used to store the result of the interpreter.
final
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
selectedButtons → ValueNotifier<List<CrossButton>>
Creating a list of CrossButton objects.
final
selectionMode → ValueNotifier<SelectionModes>
It's a variable that is used to store the current selection mode.
final
shakeKey → GlobalKey<ShakeWidgetState>
It's a key that is used to access the state of the ShakeWidget
final
shakeKeyColors → List<GlobalKey<BlinkWidgetState>>
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
It creates a state object for the CrossButton widget.
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
getPosition() → Offset
Get the position of the button from the global key
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select() → void
It selects the element with the given global key
selected() → bool?
selectRepeat() → void

The function _selectRepeat is called with the globalKey of the State object

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
unSelect({bool success = false}) → void

Unselects the current selection, and optionally adds the current selection to the list of selections

Operators

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