Pager class

Inheritance
Available Extensions

Constructors

Pager({Key? key, required int totalCount, required int pageEach, String prevText = "前往", String suffixText = '页', String totalText = '共%s条', PageChangeCallback? pageChange, int currentPage = 1, dynamic errorInputCallback()?, bool isEnterCallback = false, TextStyle? textStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Colors.black), int sideDiff = 2, bool showEllipsis = false, Color? prevColor, Color? nextColor, Color? ellipsisColor, EdgeInsetsGeometry? inputContentPadding = const EdgeInsets.symmetric(horizontal: 5, vertical: 5), double inputHeight = 30, double inputWidth = 50, TextEditingController? inputController, OutlineInputTextBorder outlineInputTextBorder = const OutlineInputTextBorder(borderSide: BorderSide(color: Colors.grey, width: 1.0), childBorderRadius: BorderRadius.all(Radius.circular(20))), Color? inputBgColor, TextStyle? inputTextStyle, TextStyle? inputHintTextStyle, String? inputHintText, BoxBorder? focusBorder, double borderRadius = 10, Color pageIndicatorColor = Colors.grey, Color pageIndicatorActiveColor = Colors.black, Color checkedPageColor = Colors.black, double pageTextSize = 14, double pageIndicatorHeight = 30})
const

Properties

borderRadius double
final
checkedPageColor Color
final
currentPage int
当前页数
final
ellipsisColor Color?
final
errorInputCallback → (dynamic Function()?)
错误输入
final
focusBorder BoxBorder?
final
hashCode int
The hash code for this object.
no setterinherited
inputBgColor Color?
final
inputContentPadding EdgeInsetsGeometry?
final
inputController TextEditingController?
final
inputHeight double
final
inputHintText String?
final
inputHintTextStyle TextStyle?
final
inputTextStyle TextStyle?
输入文本样式
final
inputWidth double
final
isEnterCallback bool
是否开启首次进入则回调
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
nextColor Color?
final
outlineInputTextBorder OutlineInputTextBorder
final
pageChange PageChangeCallback?
当前所在页的回调 点击和输入
final
pageEach int
每页的数据数量
final
pageIndicatorActiveColor Color
final
pageIndicatorColor Color
final
pageIndicatorHeight double
final
pageTextSize double
final
prevColor Color?
final
prevText String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showEllipsis bool
是否显示省略号
final
sideDiff int
左右边距
final
suffixText String
final
textStyle TextStyle?
文本样式
final
totalCount int
总页数
final
totalText String
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<Pager>
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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