withSilencedUpdate method
The entity
updates within the updater
will not be notified to the
UseCase
listeners, but will silently update it.
Implementation
@protected
@visibleForTesting
/// The [entity] updates within the [updater] will not be notified to the
/// [UseCase] listeners, but will silently update it.
Future<void> withSilencedUpdate(FutureOr<void> Function() updater) async {
assert(
!_isSilentUpdate,
'\n\nConcurrently running with more than one "withSilencedUpdate" '
'modifier is not supported.\n',
);
_isSilentUpdate = true;
await updater();
_isSilentUpdate = false;
}