Skip to content

landamessenger/smart-listview-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartListViewBuilder

ListView Builder which notifies different positions.

Example:

@override
Widget build(BuildContext context) {
  return SmartListViewBuilder(
    physics: const BouncingScrollPhysics(),
    addAutomaticKeepAlives: true,
    addRepaintBoundaries: true,
    itemCount: 3,
    reverse: true,
    itemBuilder: (BuildContext content, int index) {
      return Container(
        padding: const EdgeInsets.all(7.5),
        child: Text('$index item'),
      );
    },
    onStart: () {
      // initial position
    },
    onMedium: () {
      // medium position
    },
    onEnd: () {
      // end position
    },
  );
}