diffutil_sliverlist 0.1.1 copy "diffutil_sliverlist: ^0.1.1" to clipboard
diffutil_sliverlist: ^0.1.1 copied to clipboard

outdated

A SliverList that implicitly animates changes using diffutil.dart.

diffutil_sliverlist #

Pub Package

A SliverList that implicitly animates changes.


Widget build(BuildContext context) {
    return CustomScrollView(
                 slivers: [
                   DiffUtilSliverList.fromList<int>(
                     list,
                     builder: (context, item) => Container(
                       color: colors[item % colors.length],
                       height: 48,
                       width: double.infinity,
                     ),
                     insertAnimationBuilder: (context, animation, child) =>
                         FadeTransition(
                           opacity: animation,
                           child: child,
                         ),
                     removeAnimationBuilder: (context, animation, child) =>
                         SizeTransition(
                           sizeFactor: animation,
                           child: child,
                         ),
                     removeAnimationDuration: const Duration(milliseconds: 300),
                     insertAnimationDuration: const Duration(milliseconds: 120),
                   ),
                 ],
               );
}

If list changes, the list will automatically animate new/removed items:

55
likes
0
pub points
83%
popularity

Publisher

verified publisherlittlebat.dev

A SliverList that implicitly animates changes using diffutil.dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

diffutil_dart, flutter

More

Packages that depend on diffutil_sliverlist