exponentialBackoffRetryConfigSerializer top-level property
Implementation
final exponentialBackoffRetryConfigSerializer = JsonSerializer(
fromJson: (json) {
return ExponentialBackoffRetryConfig(
maxRetries: json['maxRetries'] as int,
delay: Duration(milliseconds: json['delay'] as int),
multiplier: json['multiplier'] as double,
);
},
toJson: (config) {
return {
'maxRetries': config.maxRetries,
'delay': config.delay.inMilliseconds,
'multiplier': config.multiplier,
};
},
);