EasyPagination class

Generic pagination control for lists and tables.

This widget focuses purely on navigation (page index / page size) and a professional "rows per page" summary, leaving data fetching / slicing to the caller.

Inheritance

Constructors

EasyPagination({Key? key, required int itemCount, required int pageIndex, required int pageSize, required ValueChanged<int> onPageChanged, ValueChanged<int>? onPageSizeChanged, List<int> pageSizeOptions = const [10, 25, 50], String labelBuilder(int start, int end, int total)?})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
itemCount int
Total number of items in the underlying collection.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelBuilder String Function(int start, int end, int total)?
Optional builder for the summary label (e.g. "1–10 of 57").
final
onPageChanged ValueChanged<int>
Called when the user navigates to a different page.
final
onPageSizeChanged ValueChanged<int>?
Called when the user selects a new pageSize from pageSizeOptions.
final
pageIndex int
Zero-based index of the current page.
final
pageSize int
Number of items per page.
final
pageSizeOptions List<int>
Available page-size options. Defaults to [10, 25, 50].
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited