sliver_animated_list 1.0.0+2 copy "sliver_animated_list: ^1.0.0+2" to clipboard
sliver_animated_list: ^1.0.0+2 copied to clipboard

AnimatedList + Sliver = SliverAnimatedList. This package combine AnimatedList with a Sliver.

sliver_animated_list #

pub package Build Status

Animated List to Sliver

AnimatedList uses a pattern we know is bad: it provides the scroll view. This package combine AnimatedList with a Sliver.

example

Usage #

Add sliver_animated_list to your pubspec:

dependencies:
  sliver_animated_list: ^1.0.0
      Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: CustomScrollView(
          // Column is also layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          slivers: <Widget>[
            SliverAnimatedList(
              key: _listKey,
              initialItemCount: _list.length,
              itemBuilder: _buildItem,
            ),
            SliverList(
              delegate: SliverChildBuilderDelegate(
                (BuildContext context, int i) {
                  return Container(
                    height: 100,
                    child: Text('SliverListTile : $i'),
                  );
                },
                childCount: 3,
              ),
            ),
          ],
        ),
      ),

See the example/ folder for a working example app.

5
likes
40
pub points
22%
popularity

Publisher

verified publisheramond.dev

AnimatedList + Sliver = SliverAnimatedList. This package combine AnimatedList with a Sliver.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on sliver_animated_list