CalseeKey class
A button drawn by the current theme's key renderer, with its spring press motion: Claymorphism squishes, NeoPOP extrudes, Liquid Glass inflates, and so on.
role picks which of the theme's key faces it wears: KeyRole.digit for ordinary keys, KeyRole.equals for the one primary action (the theme's accent), KeyRole.operator and KeyRole.function for secondary ones. Size it like any widget; it fills its box.
With onLongPress, a hold fills the face and fires after KeyPressMotion.holdDuration.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CalseeKey
Constructors
- CalseeKey({required KeyRole role, required CalseeKeyBuilder builder, required String semanticLabel, VoidCallback? onPressed, VoidCallback? onLongPress, bool haptics = true, int artSeed = 0, Key? key})
-
A key whose content comes from
builder.const - CalseeKey.icon(IconData icon, {required KeyRole role, required String semanticLabel, String? label, VoidCallback? onPressed, VoidCallback? onLongPress, double sizeFactor = 0.42, bool haptics = true, Key? key})
-
A key showing
icon, with an optionallabelunder it.factory - CalseeKey.text(String text, {required KeyRole role, VoidCallback? onPressed, VoidCallback? onLongPress, String? semanticLabel, double sizeFactor = 0.4, bool haptics = true, Key? key})
-
A key showing
textin the theme's key font.factory
Properties
- artSeed → int
-
Varies hand-drawn artwork (Paper & Ink, Bauhaus) between keys of the
same size.
final
- builder → CalseeKeyBuilder
-
The key's content.
final
- haptics → bool
-
Whether presses give haptic feedback.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onLongPress → VoidCallback?
-
Called after a hold.
final
- onPressed → VoidCallback?
-
Called on tap; the key is disabled (dimmed) without it and
onLongPress.
final
- role → KeyRole
-
Which of the theme's key faces this key wears.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String
-
What screen readers announce.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CalseeKey> -
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, 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