flutter_cards_reel 0.0.3 copy "flutter_cards_reel: ^0.0.3" to clipboard
flutter_cards_reel: ^0.0.3 copied to clipboard

Cards Reel list component respecting Flutter Slivers protocol

Nice and smooth Cards Reel list component respecting standard Flutter Slivers protocol.

Screenshot

Getting started #

Simply add as a dependency in pubspec.yaml

dependencies:
  flutter_cards_reel: any

Usage #

Cards Reel widget follows common Flutter lists protocol.

  • SliverCardsReel implements all the low-level slivers protocol logic so that it can be combined with anything else inside the CustomScrollView:
  CustomScrollView(
    slivers: [
      SliverList(/* some other sliver */),
      SliverCardsReel(
        itemExtent: 400,
        itemHeaderExtent: 100,
        delegate: SliverChildBuilderDelegate(
          (context, index) {
            return Padding(
              padding: const EdgeInsets.all(10),
              child: SizedBox(
                height: 400,
                child: ColorfulCard(index),
              ),
            );
          },
          childCount: 4,
        ),
      ),
      SliverList(/* some other sliver */),
    ],
  )
  • CardsReelView provides standard API for children and builder options similar to ListView widget:
  CardsReelView.builder(
    itemExtent: 400,
    itemHeaderExtent: 100,
    itemCount: 5,
    itemBuilder: (context, index) {
      return Padding(
        padding: const EdgeInsets.all(10),
        child: SizedBox(
          height: 400,
          child: ColorfulCard(index),
        ),
      );
    },
  )
  • CardsReelPhysics provides simple cards snapping logic and is being used by CardsReelView widget internally

Please follow the /example folder for additional details.

5
likes
130
points
64
downloads

Publisher

verified publisherkoldoon.ru

Weekly Downloads

Cards Reel list component respecting Flutter Slivers protocol

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_cards_reel