Service<TParams extends Object?> class
abstract
A base class for services that require initialization and disposal management.
This class is intended to be used within a Dependency Injection DI system.
It provides a standardized structure for managing the lifecycle of services, ensuring they are properly initialized when needed and disposed of when no longer in use.
Constructors
- Service()
Properties
- disposed → bool
-
Whether the service has been disposed.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialized → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → FutureOr< void> - Disposes of this service, making it unusable and ready for garbage collection.
-
init(
TParams params) → FutureOr< void> - Initializes and re-initializes this service, making it ready for use.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
provideDisposeListeners(
) → ServiceListeners< void> -
provideInitListeners(
) → ServiceListeners< TParams> -
restartService(
TParams params) → FutureOr< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited