A listview in flutter has some common basic required UX as described in Features. The problem is, most designers (according to my experiences) is only showing the design with defined data to the design. Ignoring the states or basic UX that should be available in every listview. And programmers might miss some of those required minimum common UX listview. E.g: Missing next page loading. This package is for those who are getting trouble to get it done because this package summarize and simplify the DX to make those minimum UX available.
Features
- Show loading
- Drag to refresh
- Next page on scroll to bottom
- Show error
- Show empty placeholder
Getting started
import 'package:common_listview/common_listview.dart';
Usage
CommonPaginatedList(
loading: loading,
page: page,
length: data.length,
itemBuilder: (c, i) {
Issue data = this.data[i];
return ListTile(
leading: Text('$i'),
title: Text('${data.title}'),
);
},
onNext: onNext,
onRefresh: () async {
resetData();
},
errorMsg: null,
)