Skip to main content
The Stac SliverToBoxAdapter allows you to build a Flutter sliver-to-box-adapter widget using JSON. It creates a sliver that contains a single box widget. To know more about the sliver-to-box-adapter widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
childMap<String, dynamic>?The widget contained by this sliver.

Example

StacSliverPadding(
  padding: StacEdgeInsets.all(16),
  sliver: StacSliverToBoxAdapter(
    child: StacContainer(
      height: 150,
      color: StacColors.green,
      child: StacCenter(
        child: StacText(
          data: 'I am a Box inside a SliverToBoxAdapter!',
          style: StacTextStyle(color: StacColors.white, fontWeight: StacFontWeight.bold),
        ),
      ),
    ),
  ),
)