ifSync method
Performs a side-effect if this is a Sync.
Implementation
@override
@pragma('vm:prefer-inline')
Sync<T> ifSync(
@noFuturesAllowed void Function(Sync<T> sync) noFuturesAllowed,
) {
try {
noFuturesAllowed(this);
return this;
} catch (error) {
return Sync.unsafe(Err(error));
}
}