Pagination
Navigate static Flutter result pages with a compact, derived number range.
Navigate static result pages with a compact, derived number range.
Contract
| Axis | Contract |
|---|---|
| Range | boundaryCount, siblingCount |
| Current page | Clamped to 1...totalPages |
Install
Add the package, then import its public library.
flutter pub add tinyrack_uiimport 'package:tinyrack_ui/tinyrack_ui.dart';Playground
Usage
import 'package:material_ui/material_ui.dart';
import 'package:tinyrack_ui/tinyrack_ui.dart';
TRPagination(
currentPage: page,
totalPages: 12,
onPageChanged: setPage,
)Examples
Control the current page permalink
Keep page state in the parent and tune the derived range without rebuilding pagination items.
API
TRPagination properties
| Prop | Type / default | Purpose |
|---|---|---|
currentPage | int · required | Selects the current page. |
totalPages | int · required | Sets the available page count. |
onPageChanged | ValueChanged<int> · required | Receives page activations. |
boundaryCount / siblingCount | int · 1 | Controls pinned and adjacent pages. |