fun addListener(listener: ObservableField.Observer<T>, notifyInitially: Boolean = false): Unit
Adds an observer for the value. If notifyInitially = true
, it will be called immediately
with the currently existing value.
fun addListener(single: Boolean = false, notifyInitially: Boolean = false, lambda: (T) -> Unit): ObservableField.Observer<T>
Adds lambda as an observer for the value. If notifyInitially = true
, it will be called
immediately with the currently existing value. If single = true
, the observer will be
automatically removed after the first change of the value.