ComponentPaginationAbstract class Null safety

Base component paginator. If don't want custom behavior on page update use ComponentPaginationBase.

Inheritance
Implementers

Constructors

ComponentPaginationAbstract(IInteractions interactions, {String firstLabel = '<<', String prevLabel = '<', String nextLabel = '>', String lastLabel = '>>', IEmoji? firstEmoji, IEmoji? prevEmoji, IEmoji? nextEmoji, IEmoji? lastEmoji, Duration? timeout, IUser? user})
Creates new paginator using interactions

Properties

builder ComponentMessageBuilder
Message builder used to create paginated messages
read / write
currentPage int
Current page that paginator is on
read / writeoverride-getter
customPreId String
Custom id for this instance of paginator that different paginators could be recognized.
latefinal
firstEmoji IEmoji?
final
firstLabel String
final
hashCode int
The hash code for this object.
read-onlyinherited
interactions IInteractions
Reference to Interactions
final
lastEmoji IEmoji?
final
lastLabel String
final
maxPage int
Number of pages
read-onlyinherited
message IMessage?
read / write
nextEmoji IEmoji?
final
nextLabel String
final
prevEmoji IEmoji?
final
prevLabel String
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
timeout Duration?
A timeout after which pagination will be disabled for this message.
final
user IUser?
The user that can use the pagination.
final

Methods

getMessageBuilderForPage(int page, ComponentMessageBuilder currentBuilder) ComponentMessageBuilder
Returns MessageBuilder for page number. Always modify builder passed in currentBuilder argument.
inherited
initHook(ComponentMessageBuilder builder) ComponentMessageBuilder
Called after initializing basic components.
initMessageBuilder() ComponentMessageBuilder
Inits ComponentMessageBuilder with buttons needed for pagination. And hooks needed events.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onFirstPageButtonClicked() → void
Invoked on first page button click
override
onLastPageButtonClicked() → void
Invoked when last page button is clicked.
override
onNextPageButtonClicked() → void
Invoked when next page button is clicked.
override
onPreviousPageButtonClicked() → void
Invoked when previous page button is clicked.
override
toString() String
A string representation of this object.
inherited
updatePage(int page, ComponentMessageBuilder currentBuilder, IButtonInteractionEvent target) FutureOr<void>
Invoked on each page update. Current page number is passed in page argument. Builder that message should be edited with is passed in currentBuilder argument. target parameter is generic and allows customization of how message will be modified.
inherited

Operators

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