NZPullToRefresh constructor

const NZPullToRefresh({
  1. Key? key,
  2. required Widget child,
  3. required Future<void> onRefresh(),
  4. bool showSpinner = true,
  5. String? label,
  6. String? readyLabel = '释放立即刷新',
  7. String? refreshingLabel = '正在刷新...',
  8. String? successLabel = '刷新成功',
  9. TextStyle? labelStyle,
  10. bool showIcon = true,
  11. IconData? successIcon = Icons.check_circle_outline_rounded,
  12. Color? backgroundColor,
  13. Color? color,
  14. double displacement = 40.0,
  15. double triggerDistance = 60.0,
  16. Duration refreshDelay = Duration.zero,
  17. bool enableHaptic = true,
})

Implementation

const NZPullToRefresh({
  super.key,
  required this.child,
  required this.onRefresh,
  this.showSpinner = true,
  this.label,
  this.readyLabel = '释放立即刷新',
  this.refreshingLabel = '正在刷新...',
  this.successLabel = '刷新成功',
  this.labelStyle,
  this.showIcon = true,
  this.successIcon = Icons.check_circle_outline_rounded,
  this.backgroundColor,
  this.color,
  this.displacement = 40.0,
  this.triggerDistance = 60.0,
  this.refreshDelay = Duration.zero,
  this.enableHaptic = true,
});