nex_common_pagination 0.0.2 copy "nex_common_pagination: ^0.0.2" to clipboard
nex_common_pagination: ^0.0.2 copied to clipboard

This package provides a utility class for handling pagination when the user scrolls.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:nex_common_pagination/view/pagination_widget.dart';

void main() {
  runApp(MyListView());
}

class MyListView extends StatelessWidget {
  final List<String> items = List.generate(50, (index) => 'Item $index');
  int totalItems = 100;
  int currentItems = 50;

  void fetchMoreItems() {
    // Fetch more items and update the list
  }

  @override
  Widget build(BuildContext context) {
    return PaginationWidget(
      child: ListView.builder(
        itemCount: items.length,
        itemBuilder: (context, index) {
          return ListTile(title: Text(items[index]));
        },
      ),
      paginationFunction: fetchMoreItems,
      total: totalItems,
      current: currentItems,
      paginate: true,
    );
  }
}
1
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

This package provides a utility class for handling pagination when the user scrolls.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, get

More

Packages that depend on nex_common_pagination