UseCase<E extends Entity> class
abstract
- Inheritance
-
- Object
- StateNotifier<E>
- UseCase
Properties
-
debugEntity
→ E
-
A development-only way to access entity outside of UseCase.
no setter
-
debugState
→ E
-
A development-only way to access state outside of
StateNotifier
.
no setterinherited
-
entity
↔ E
-
The current entity instance of this UseCase.
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hasListeners
→ bool
-
If a listener has been added using addListener and hasn't been removed yet.
no setterinherited
-
mounted
→ bool
-
Whether dispose was called or not.
no setterinherited
-
onError
↔ ErrorListener?
-
A callback for error reporting if one of the listeners added with addListener throws.
getter/setter pairinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ E
-
The current "state" of this
StateNotifier
.
getter/setter pairinherited
-
stream
→ Stream<E>
-
A broadcast stream representation of a
StateNotifier
.
no setterinherited
Methods
-
addListener(Listener<E> listener, {bool fireImmediately = true})
→ RemoveListener
-
Subscribes to this object.
inherited
-
clearDebounce()
→ void
-
inherited
-
debounce({required void action(), required String tag, Duration duration = const Duration(milliseconds: 300), bool immediate = true})
→ void
-
Executes the
action
so that it will only be executed
when there is no further repeated actions with same tag
in a given frame of duration
.
inherited
-
debugEntityUpdate(E update(E))
→ E
-
A development-only way to update entity outside of UseCase.
-
dispose()
→ void
-
Frees all the resources associated with this object.
override
-
getDomainModel<M extends DomainModel>()
→ M
-
-
getInput<S extends SuccessDomainInput>(DomainModel domainModel)
→ Future<UseCaseInput<S>>
-
-
getInternalInput<S extends SuccessDomainInput>(DomainModel domainModel)
→ FutureOr<Either<FailureDomainInput, S>>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
request<S extends SuccessDomainInput>(DomainModel domainModel, {required InputCallback<E, S> onSuccess, required InputCallback<E, FailureDomainInput> onFailure})
→ Future<void>
-
-
setInput<I extends DomainInput>(I input)
→ void
-
-
subscribe<M extends DomainModel, I extends DomainInput>(RequestSubscription<M, I> subscription)
→ void
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
transformToDomainModel<M extends DomainModel>(E entity)
→ M
-
-
updateShouldNotify(E old, E current)
→ bool
-
Whether to notify listeners or not when state changes
override
-
withSilencedUpdate(FutureOr<void> updater())
→ Future<void>
-
The entity updates within the
updater
will not be notified to the
UseCase listeners, but will silently update it.