maxAttempts property Null safety
The maximum attempts to connect.
The attempts will be reset when the replicator is able to connect and replicate with the remote server again.
Setting the maxAttempts value to null
, the default max attempts of 10
times for single shot replicators and infinite times for continuous
replicators will be applied.
Setting the value to 1
with result in no retry attempts.
Setting 0
a negative number will result in an ArgumentError being
thrown.
Implementation
int? get maxAttempts => _maxAttempts;
Implementation
set maxAttempts(int? maxAttempts) {
if (maxAttempts != null && maxAttempts <= 0) {
throw ArgumentError.value(
maxAttempts,
'maxAttempts',
'must not be zero or negative',
);
}
_maxAttempts = maxAttempts;
}