onRetry property
重试回调函数
在每次重试前调用,可用于通知UI层或记录日志
attemptNumber 当前重试次数(从1开始)
error 导致重试的错误
delay 即将等待的延迟时间
Implementation
final void Function(int attemptNumber, DioException error, Duration delay)?
onRetry;
重试回调函数
在每次重试前调用,可用于通知UI层或记录日志
attemptNumber 当前重试次数(从1开始)
error 导致重试的错误
delay 即将等待的延迟时间
final void Function(int attemptNumber, DioException error, Duration delay)?
onRetry;