PaginationOptions class

PaginationOptions - Configuration options for the Pagination widget.

Properties:

  • totalPages: The total number of pages available for navigation.
  • currentUserPage: The current page number for the user.
  • handlePageChange: Callback function for handling page change events.
  • position: Position of the pagination container ('middle' by default).
  • location: Location of pagination (e.g., 'bottom').
  • direction: Direction of pagination (e.g., 'horizontal' or 'vertical').
  • buttonsContainerStyle: Optional styling constraints for the pagination buttons container.
  • alternateIconComponent: Optional widget for an alternate icon display in pagination.
  • iconComponent: Optional widget for the main icon display in pagination.
  • activePageColor: Background color for the active page button.
  • inactivePageColor: Background color for inactive page buttons.
  • backgroundColor: Background color for the pagination container.
  • paginationHeight: Maximum height of the pagination component.
  • showAspect: Boolean to show pagination (defaults to true).
  • parameters: Provides the parameters needed for handling page changes, including room settings, socket information, user access level, and any alert functionality.

Example Usage:

Pagination(
  options: PaginationOptions(
    totalPages: 10,
    currentUserPage: 1,
    parameters: PaginationParametersImplementation(),
  ),
);

Constructors

PaginationOptions({required int totalPages, required int currentUserPage, GeneratePageContentType handlePageChange = generatePageContent, String position = 'middle', String location = 'bottom', String direction = 'horizontal', BoxConstraints? buttonsContainerStyle, Widget? alternateIconComponent, Widget? iconComponent, Color activePageColor = const Color(0xFF2c678f), Color? inactivePageColor, Color backgroundColor = const Color(0xFFFFFFFF), double paginationHeight = 40.0, bool showAspect = true, required PaginationParameters parameters})

Properties

activePageColor Color
final
alternateIconComponent Widget?
final
backgroundColor Color
final
buttonsContainerStyle BoxConstraints?
final
currentUserPage int
final
direction String
final
handlePageChange GeneratePageContentType
final
hashCode int
The hash code for this object.
no setterinherited
iconComponent Widget?
final
inactivePageColor Color?
final
location String
final
paginationHeight double
final
parameters PaginationParameters
final
position String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showAspect bool
final
totalPages int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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