StreamButtonProps class

Properties for configuring a StreamButton.

This class holds all the configuration options for a button, allowing them to be passed through the StreamComponentFactory.

The presence of child determines the button's shape:

See also:

Constructors

StreamButtonProps({Widget? child, VoidCallback? onPressed, VoidCallback? onLongPress, StreamButtonStyle style = .primary, StreamButtonType type = .solid, StreamButtonSize size = .medium, Widget? iconLeft, Widget? iconRight, bool? isFloating, bool? isSelected, bool autofocus = false, String? tooltip, StreamButtonThemeStyle? themeStyle})
Creates properties for a button.
const

Properties

autofocus → bool
Whether the button should request focus when first mounted.
final
child → Widget?
The main content widget displayed inside the button.
final
hashCode → int
The hash code for this object.
no setterinherited
iconLeft → Widget?
The icon displayed at the leading edge of the button, before child.
final
iconRight → Widget?
The icon displayed at the trailing edge of the button, after child.
final
isFloating → bool?
Whether the button has a floating (elevated) appearance.
final
isSelected → bool?
Whether the button is in a selected state.
final
onLongPress → VoidCallback?
Called when the button is long-pressed.
final
onPressed → VoidCallback?
Called when the button is tapped or otherwise activated.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → StreamButtonSize
The size of the button.
final
style → StreamButtonStyle
The visual style variant of the button.
final
themeStyle → StreamButtonThemeStyle?
Per-instance style overrides for this button.
final
tooltip → String?
Text shown in a Tooltip on hover / long-press, and used as the button's accessibility label.
final
type → StreamButtonType
The type variant of the button.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited