SliverGutter constructor

const SliverGutter({
  1. Key? key,
  2. required Widget sliver,
  3. bool enabled = true,
})

Creates a SliverGutter widget.

The sliver parameter is required and specifies the sliver to apply padding to. The enabled parameter controls whether padding is applied, defaulting to true.

Example:

CustomScrollView(
  slivers: [
    SliverGutter(
      sliver: SliverList(
        delegate: SliverChildBuilderDelegate(
          (context, index) => ListTile(
            title: Text("Item $index"),
          ),
          childCount: 20,
        ),
      ),
    ),
  ],
)

Implementation

const SliverGutter({super.key, required this.sliver, this.enabled = true});