Joystick class
Joystick widget
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Joystick
Constructors
- Joystick({Key? key, required StickDragCallback listener, Duration period = const Duration(milliseconds: 100), Widget? base, Widget stick = const JoystickStick(), JoystickMode mode = JoystickMode.all, StickOffsetCalculator stickOffsetCalculator = const CircleStickOffsetCalculator(), JoystickController? controller, Function? onStickDragStart, Function? onStickDragEnd})
-
const
Properties
- base → Widget?
-
Widget that renders joystick base, by default JoystickBase.
final
- controller → JoystickController?
-
Controller allows to control joystick events outside the widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listener → StickDragCallback
-
Callback, which is called with period frequency when the stick is dragged.
final
- mode → JoystickMode
-
Possible directions mode of the joystick stick, by default JoystickMode.all
final
- onStickDragEnd → Function?
-
Callback, which is called when the stick released.
final
- onStickDragStart → Function?
-
Callback, which is called when the stick starts dragging.
final
- period → Duration
-
Frequency of calling listener from the moment the stick is dragged, by default 100 milliseconds.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stick → Widget
-
Widget that renders joystick stick, it places in the center of base widget, by default JoystickStick.
final
- stickOffsetCalculator → StickOffsetCalculator
-
Calculate offset of the stick based on the stick drag start position and the current stick position.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Joystick> -
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}) → 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