isTransient property
bool
get
isTransient
Whether retrying the same send could plausibly succeed later.
Covers conditions that change on their own — no service, a radio that is off, a busy network, a rate limit. It does not cover anything the user or the app has to fix first, such as a denied permission or a barred number.
The timeouts are deliberately excluded. sendTimeout means the plugin could not tell whether the message went out, so an automatic retry risks a duplicate; deliveryTimeout means it was sent. Both cost money to retry blindly, so both are left for the caller to decide about explicitly.
Implementation
bool get isTransient => switch (this) {
noService ||
radioOff ||
radioNotAvailable ||
genericFailure ||
limitExceeded ||
networkReject ||
networkError ||
modemError ||
noMemory ||
noResources ||
systemError => true,
_ => false,
};