flutter_pagination_data 0.0.1 copy "flutter_pagination_data: ^0.0.1" to clipboard
flutter_pagination_data: ^0.0.1 copied to clipboard

pagination package

This package helps in the bagging process when receiving data from the Internet, reduces the number of requests, and get data that fits on one page.

Features #

A Pagination Library for Flutter (with Web Support).

Getting started #

Usage #

class CustomPaginationWidget extends StatelessWidget {
  const CustomPaginationWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return CustomPagination<NewsData>(
      separatorWidget: SizedBox(
        height: 10.0,
      ),
      itemBuilder: (BuildContext context, item) {
        return ListTile(
          title:
          Text(item.title),
          subtitle: Text(item.description),
          leading: IconButton(
            icon: Icon(Icons.more_horiz),
            onPressed: () => print(item.id),
          ),
          onTap: () => print(item.source),
          trailing: Icon(
            Icons.add,
          ),
        );
      },
      fetchMethod: fetchMethod,
      onError: (error) => Center(
        child: Text('Error'),
      ),
      onEmpty: Center(
        child: Text('Empty'),
      ),
    );
  }
}

Additional information #

1
likes
0
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

pagination package

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_pagination_data