Skip to main content
The Stac Filled Button allows you to build a Flutter filled button widget using JSON. To know more about the filled button widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
onPressedStacActionThe callback that is called when the button is tapped.
onLongPressStacActionThe callback that is called when the button is long-pressed.
onHoverStacActionThe callback that is called when the button is hovered over.
onFocusChangeStacActionThe callback that is called when the button’s focus changes.
styleStacButtonStyleThe style to apply to the button.
autofocusboolWhether the button should be focused when the page is loaded. Defaults to false.
clipBehaviorStacClipDetermines how the content should be clipped. Defaults to Clip.none.
childStacWidgetThe widget to display inside the button.

Example

StacFilledButton(
  onPressed: StacNoneAction(),
  style: StacButtonStyle(
    backgroundColor: StacColors.amber,
    foregroundColor: StacColors.black,
  ),
  autofocus: false,
  clipBehavior: StacClip.none,
  child: StacText(data: 'Click Me!'),
)