getMaxStalenessSeconds static method
Implementation
static int? getMaxStalenessSeconds(Map<String, Object>? options) {
if (options == null) {
return null;
}
if (options[keyMaxStalenessSecond] != null) {
if (options[keyMaxStalenessSecond] is! int ||
options[keyMaxStalenessSecond] as int < 0) {
throw ArgumentError('maxStalenessSeconds must be a positive integer');
}
return options[keyMaxStalenessSecond] as int;
}
return null;
}