refresh method
Future<void>
refresh(
{ - Duration draggingDuration = const Duration(milliseconds: 300),
- Curve draggingCurve = Curves.linear,
})
Implementation
Future<void> refresh({
Duration draggingDuration = const Duration(milliseconds: 300),
Curve draggingCurve = Curves.linear,
}) async {
await show(
draggingDuration: draggingDuration,
draggingCurve: draggingCurve,
);
try {
await widget.onRefresh();
} finally {
/// If the user has programmatically hidden the pointer
/// so it is not in "loading" state, then nothing needs to be done.
if (controller.isLoading) {
await hide();
}
}
}