MapChange

interface MapChange<K, V>

This sealed interface describes the possible changes that can happen to a RealmMap.

The states are represented by the specific subclasses InitialMap, UpdatedMap and DeletedMap. When the map is deleted an empty map is emitted instead of null.

Since maps do not expose indices your UI components will have to manually handle updates:

person.addresses.asFlow()
.collect { mapChange: MapChange<String, Address> ->
handleChange(mapChange.map)
}

Properties

map
Link copied to clipboard
abstract val map: RealmMap<K, V>

Inheritors

InitialMap
Link copied to clipboard
UpdatedMap
Link copied to clipboard
DeletedMap
Link copied to clipboard