StudioSplitKey class

A split key: a key for the usual action and, butted against it, a narrow key with a chevron that opens the others in a glass list. The narrow key stays down while its list is open; Down on the main key opens it too. lit makes both halves the graphite main key.

Built on ui_core's DesignSplitButton. A null onPressed disables the main half; the list stays.

Reads style for both halves, then the main key's theme slot (StudioThemeData.buttonStyle or StudioThemeData.litButtonStyle).

StudioSplitKey(label: 'Export', onPressed: exportMp3, actions: [StudioMenuItem(label: 'Export WAV', onPressed: exportWav)])
Inheritance

Constructors

StudioSplitKey({Key? key, required String label, required VoidCallback? onPressed, required List<StudioMenuItem> actions, bool lit = false, String? menuLabel, StudioStyle? style})
A split key whose main action is onPressed.
const

Properties

actions → List<StudioMenuItem>
The other actions.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String
The main action's legend.
final
lit → bool
Whether it is the screen's main action (graphite, lit).
final
What a screen reader calls the narrow key; null: "More options".
final
onPressed → VoidCallback?
The main action; null disables the main half.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → StudioStyle?
Both halves' style.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's 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.
override
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