ICleanable class abstract

Interface for components that should clean their state.

Cleaning state most often is used during testing. But there may be situations when it can be done in production.

See Cleaner

Example

class MyObjectWithState implements ICleanable {
    dynamic _state = {};
    ...
    Future clear(String correlationId) {
       _state = {};
       return  Future();
    }
}

Constructors

ICleanable()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear(String? correlationId) Future
Clears component state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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