Pager constructor
const
Pager({
- Key? key,
- required int totalCount,
- required int pageEach,
- String prevText = "前往",
- String suffixText = '页',
- String totalText = '共%s条',
- PagerInputType pagerInputType = PagerInputType.input,
- PageChangeCallback? pageChange,
- int currentPage = 1,
- dynamic errorInputCallback()?,
- bool isEnterCallback = false,
- TextStyle? textStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Colors.black),
- List<
int> ? pageSizeList, - 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,
- BoxDecoration? checkedPageBoxDecoration,
- double pageTextSize = 14,
- double pageIndicatorHeight = 30,
Implementation
const Pager({
Key? key,
required this.totalCount,
required this.pageEach,
this.prevText = "前往",
this.suffixText = '页',
this.totalText = '共%s条',
this.pagerInputType = PagerInputType.input,
this.pageChange,
this.currentPage = 1,
this.errorInputCallback,
this.isEnterCallback= false,
this.textStyle = const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color:Colors.black),
this.pageSizeList,
this.sideDiff = 2,
this.showEllipsis = false,
this.prevColor,
this.nextColor,
this.ellipsisColor,
this.inputContentPadding = const EdgeInsets.symmetric(horizontal: 5,vertical: 5),
this.inputHeight = 30,
this.inputWidth = 50,
this.inputController,
this.outlineInputTextBorder= const OutlineInputTextBorder(
borderSide: BorderSide(
color: Colors.grey,
width: 1.0
),
childBorderRadius: BorderRadius.all(Radius.circular(20)),
),
this.inputBgColor,
this.inputTextStyle,
this.inputHintTextStyle,
this.inputHintText,
this.focusBorder,
this.borderRadius = 10,
this.pageIndicatorColor = Colors.grey,
this.pageIndicatorActiveColor = Colors.black,
this.checkedPageColor = Colors.black,
this.checkedPageBoxDecoration,
this.pageTextSize = 14,
this.pageIndicatorHeight = 30,
}):super(key: key);