Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stac.dev/llms.txt

Use this file to discover all available pages before exploring further.

The Stac Text Button allows you to build a Flutter text button widget using JSON. To know more about the text 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.
isSemanticButtonboolDetermine whether this subtree represents a button. Defaults to true.
childStacWidgetThe widget to display inside the button.

Example

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