fromMap static method
Loads configuration from a map
Implementation
static bool fromMap(Map<String, dynamic> config) {
try {
final intervals = List<int>.from(
config['retryIntervals'] ?? defaultRetryIntervals,
);
final backgroundInterval =
config['backgroundProcessingInterval'] ??
defaultBackgroundProcessingInterval;
if (validateRetryIntervals(intervals) &&
validateBackgroundInterval(backgroundInterval)) {
_currentRetryIntervals = intervals;
_currentBackgroundInterval = backgroundInterval;
return true;
}
return false;
} catch (e) {
return false;
}
}