entity property
The current entity instance of this UseCase
.
Updating this variable will synchronously call all the listeners. Notifying the listeners is O(N) with N the number of listeners.
Updating the domain state will throw if at least one listener throws.
Implementation
@override
EntityFake get entity => _entity;
Updates the entity
with the newEntity
and notifies all the listeners.
For testing purposes,
you can use debugEntityUpdate
to update use case state.
Implementation
@protected
/// Updates the [entity] with the [newEntity] and notifies all the listeners.
///
/// For testing purposes,
/// you can use [debugEntityUpdate] to update use case state.
set entity(E newEntity) => super.state = newEntity;