KeyboardWidget class
A keymap widget allowing easy addition of shortcut keys to any widget tree with an optional help screen overlay
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- KeyboardWidget
Constructors
-
KeyboardWidget({Key? key, required List<
KeyAction> bindings, String? helpText, bool hasFocus = true, required Widget child, LogicalKeyboardKey showDismissKey = LogicalKeyboardKey.f1, int columnCount = 1, Color? backgroundColor, TextStyle? textStyle, bool showMap = false, VoidCallback? callbackOnHide}) -
Creates a new KeyboardWidget with a list of Keystrokes and associated
functions
bindings
, a requiredchild
widget and an optional keystroke to show and dismiss the displayed map,showDismissKey
.const
Properties
- backgroundColor → Color?
-
The color of the surface of the card used to display a help screen.
If null, the card color of the inherited ThemeData.colorScheme will be used
final
-
bindings
→ List<
KeyAction> -
The list of keystrokes and methods called
final
- callbackOnHide → VoidCallback?
-
final
- child → Widget
-
final
- columnCount → int
-
The number of columns of text in the help screen
final
- hasFocus → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helpText → String?
-
Optional introductory/descriptive text to include above the table of
keystroke shortcuts. It expects text in the
https://daringfireball.net/projects/markdown/
markdown format, using thehttps://pub.dev/packages/flutter_markdown
flutter markdown package.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDismissKey → LogicalKeyboardKey
-
The keystroke used to show and dismiss the help screen
final
- showMap → bool
-
final
- textStyle → TextStyle?
-
The text style for the text used in the help screen. If null, the
inherited TextTheme.labelSmall is used.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → KeyboardWidgetState -
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