Pager constructor

const Pager({
  1. Key? key,
  2. required int totalCount,
  3. required int pageEach,
  4. String prevText = "前往",
  5. String suffixText = '页',
  6. String totalText = '共%s条',
  7. PageChangeCallback? pageChange,
  8. int currentPage = 1,
  9. dynamic errorInputCallback()?,
  10. bool isEnterCallback = false,
  11. TextStyle? textStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Colors.black),
  12. int sideDiff = 2,
  13. bool showEllipsis = false,
  14. Color? prevColor,
  15. Color? nextColor,
  16. Color? ellipsisColor,
  17. EdgeInsetsGeometry? inputContentPadding = const EdgeInsets.symmetric(horizontal: 5, vertical: 5),
  18. double inputHeight = 30,
  19. double inputWidth = 50,
  20. TextEditingController? inputController,
  21. OutlineInputTextBorder outlineInputTextBorder = const OutlineInputTextBorder(borderSide: BorderSide(color: Colors.grey, width: 1.0), childBorderRadius: BorderRadius.all(Radius.circular(20))),
  22. Color? inputBgColor,
  23. TextStyle? inputTextStyle,
  24. TextStyle? inputHintTextStyle,
  25. String? inputHintText,
  26. BoxBorder? focusBorder,
  27. double borderRadius = 10,
  28. Color pageIndicatorColor = Colors.grey,
  29. Color pageIndicatorActiveColor = Colors.black,
  30. Color checkedPageColor = Colors.black,
  31. double pageTextSize = 14,
  32. double pageIndicatorHeight = 30,
})

Implementation

const Pager({
  Key? key,
  required this.totalCount,
  required this.pageEach,
  this.prevText = "前往",
  this.suffixText = '页',
  this.totalText = '共%s条',
  this.pageChange,
  this.currentPage = 1,
  this.errorInputCallback,
  this.isEnterCallback= false,
  this.textStyle = const TextStyle(
      fontSize: 14,
      fontWeight: FontWeight.w400,
      color:Colors.black),
  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.pageTextSize = 14,
  this.pageIndicatorHeight = 30,
}):super(key: key);