A Pagination Library for Flutter (with Web Support).
just add below in pubspec.yaml
pagination: ^0.1.0
import 'package:pagination/pagination.dart';
Demo Code:
PaginationList<User>(
separatorWidget: Container(
height: 0.5,
color: Colors.black,
),
itemBuilder: (BuildContext context, User user) {
return ListTile(
title:
Text(user.prefix + " " + user.firstName + " " + user.lastName),
subtitle: Text(user.designation),
leading: IconButton(
icon: Icon(Icons.person_outline),
onPressed: () => null,
),
onTap: () => print(user.designation),
trailing: Icon(
Icons.call,
color: Colors.green,
),
);
},
pageFetch: pageFetch,
onError: (dynamic error) => Center(
child: Text('Something Went Wrong'),
),
...
onEmpty: Center(
child: Text('Empty List'),
),
),
Email: [email protected]