SheenComposer class

The bar at the bottom of a chat: a button to share music, a field that grows to five lines, and Send in the accent (disabled while the field is empty). It sits above the keyboard and the home indicator.

SheenComposer(
  controller: text,
  onSend: (message) => chat.send(message),
  onAttach: () => showShareMusicSheet(context),
  onTyping: () => chat.typing(),
)
Inheritance

Constructors

SheenComposer({Key? key, required TextEditingController controller, required ValueChanged<String> onSend, VoidCallback? onAttach, VoidCallback? onTyping, String? placeholder, int maxLength = 2000, FocusNode? focusNode})
A composer writing into controller.
const

Properties

controller → TextEditingController
The text being written.
final
focusNode → FocusNode?
The field's focus.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxLength → int
The longest message.
final
onAttach → VoidCallback?
Opens a way to share music; no button when null.
final
onSend → ValueChanged<String>
Send was tapped with this text (trimmed, never empty); clearing the field is up to the app.
final
onTyping → VoidCallback?
The text changed (at most once every few seconds is worth telling anyone).
final
placeholder → String?
The placeholder; SheenSocialStrings.message by default.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<SheenComposer>
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