RetryConfig.fromJson constructor
RetryConfig.fromJson(
- Object? j
Implementation
factory RetryConfig.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return RetryConfig(
maxAttempts: switch (json['maxAttempts']) {
null => 0,
Object $1 => decodeInt($1),
},
maxRetryDuration: switch (json['maxRetryDuration']) {
null => null,
Object $1 => Duration.fromJson($1),
},
minBackoff: switch (json['minBackoff']) {
null => null,
Object $1 => Duration.fromJson($1),
},
maxBackoff: switch (json['maxBackoff']) {
null => null,
Object $1 => Duration.fromJson($1),
},
maxDoublings: switch (json['maxDoublings']) {
null => 0,
Object $1 => decodeInt($1),
},
);
}