sliver_center 0.0.1+2 copy "sliver_center: ^0.0.1+2" to clipboard
sliver_center: ^0.0.1+2 copied to clipboard

Sliver Center For CustomScrollView

SliverCenter #

A Flutter widget that centers its sliver child within the available space along the cross axis. This is particularly useful when you want to ensure a sliver, such as a SliverList or SliverGrid, is positioned in the center of its parent, regardless of the parent's size.

Usage #

Wrap your sliver child with SliverCenter to center it. SliverCenter works within the context of a CustomScrollView and its sliver layout system.

Preview #

Pverview Pverview

Code #

SliverCenter(
  sliver: SliverList( // Or any other sliver
    delegate: SliverChildBuilderDelegate(
      (BuildContext context, int index) {
        return Container(
          height: 50,
          color: Colors.blue,
        );
      },
      childCount: 10,
    ),
  ),
)
4
likes
150
points
538
downloads

Publisher

verified publishercodinghouse.biz

Weekly Downloads

Sliver Center For CustomScrollView

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on sliver_center