NZPullToRefresh constructor
const
NZPullToRefresh({
- Key? key,
- required Widget child,
- required Future<
void> onRefresh(), - bool showSpinner = true,
- String? label,
- String? readyLabel = '释放立即刷新',
- String? refreshingLabel = '正在刷新...',
- String? successLabel = '刷新成功',
- TextStyle? labelStyle,
- bool showIcon = true,
- IconData? successIcon = Icons.check_circle_outline_rounded,
- Color? backgroundColor,
- Color? color,
- double displacement = 40.0,
- double triggerDistance = 60.0,
- Duration refreshDelay = Duration.zero,
- 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,
});