Service class abstract

Convenience base class for ServiceMixin. Use this if you don't need to extend another class; otherwise mix in ServiceMixin directly.

Mixed-in types

Constructors

Service()

Properties

didEverInitAndSuccessfully bool
true once init has completed successfully at least once for this service instance. Stays true even after a subsequent error or dispose.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ServiceState
The current state of the service.
no setterinherited

Methods

dispose({bool eagerError = false}) Resolvable<Unit>
Drives the service into ServiceState.DISPOSE_SUCCESS by running listeners from provideDisposeListeners.
inherited
init({bool eagerError = true}) Resolvable<Unit>
Drives the service from ServiceState.NOT_INITIALIZED to ServiceState.RUN_SUCCESS by running every listener from provideInitListeners sequentially.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause({bool eagerError = false}) Resolvable<Unit>
Transitions the service into ServiceState.PAUSE_SUCCESS by running listeners from providePauseListeners.
inherited
provideDisposeListeners(void _) TServiceResolvables<Unit>
Subclasses return the listeners to run when dispose is called. Mixins must call super.provideDisposeListeners(null) and prepend/append their own listeners (typically prepending teardown ahead of super's base cleanup).
inherited
provideInitListeners(void _) TServiceResolvables<Unit>
Subclasses return the listeners to run when init is called. Mixins must call super.provideInitListeners(null) and prepend/append their own listeners.
inherited
providePauseListeners(void _) TServiceResolvables<Unit>
Subclasses return the listeners to run when pause is called. Mixins must call super.providePauseListeners(null) and prepend/append their own listeners.
inherited
provideResumeListeners(void _) TServiceResolvables<Unit>
Subclasses return the listeners to run when resume is called. Mixins must call super.provideResumeListeners(null) and prepend/append their own listeners.
inherited
resume({bool eagerError = false}) Resolvable<Unit>
Transitions the service into ServiceState.RESUME_SUCCESS by running listeners from provideResumeListeners.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited