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

Properties

PropertyTypeDescription
opacitydoubleThe opacity value between 0.0 and 1.0 which controls the visibility of the child, with 0.0 being fully transparent (invisible) and 1.0 being fully opaque (visible).
childStacWidgetThe child widget of the opacity.

Example

StacScaffold(
  appBar: StacAppBar(
    title: StacText(data: 'Opacity'),
  ),
  body: StacCenter(
    child: StacOpacity(
      opacity: 0.5,
      child: StacText(
        data: 'Opacity Widget',
        style: StacTextStyle(fontSize: 23, fontWeight: StacFontWeight.w600),
      ),
    ),
  ),
)