StacOutlinedButton class
A Stac model representing Flutter's OutlinedButton
widget.
Represents a Material Design outlined button that responds to touches by filling with color.
StacOutlinedButton(
onPressed: {'action': 'navigate', 'route': '/next'},
child: StacText(data: 'Press me'),
style: StacButtonStyle(elevation: 4.0),
)
{
"type": "outlinedButton",
"child": {"type": "text", "data": "Press me"},
"onPressed": {"action": "navigate", "route": "/next"}
}
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacOutlinedButton
- Annotations
-
- @JsonSerializable()
Constructors
- StacOutlinedButton.new({StacAction? onPressed, StacAction? onLongPress, StacAction? onHover, StacAction? onFocusChange, StacButtonStyle? style, bool? autofocus, StacClip? clipBehavior, StacWidget? child})
-
Creates a StacOutlinedButton with the given properties.
const
-
StacOutlinedButton.fromJson(Map<
String, dynamic> json) -
Creates a StacOutlinedButton from JSON.
factory
Properties
- autofocus → bool?
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
- child → StacWidget?
-
The widget below this widget in the tree.
Typically a Text widget.
final
- clipBehavior → StacClip?
-
How to clip the button's content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- onFocusChange → StacAction?
-
Called when the focus changes.
final
- onHover → StacAction?
-
Called when a pointer enters or exits the button response area.
final
- onLongPress → StacAction?
-
Called when the button is long-pressed.
final
- onPressed → StacAction?
-
Called when the button is tapped or otherwise activated.
If null, the button will be disabled.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → StacButtonStyle?
-
Customizes this button's appearance.
final
- type → String
-
Widget type identifier.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this button to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited