Emitter

https://in-kotlin.com/design-patterns/observer/

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

Returns true if emissions are turned on AND there is at least one active subscriber listening to this emitter. Useful for avoiding expensive object creation if no one is listening.

Functions

Link copied to clipboard
fun attach(callback: (newValue: TType) -> Unit): Emitter.Connection
Link copied to clipboard
fun detach(connection: Emitter.Connection)
Link copied to clipboard
fun emit(newValue: TType)