write

abstract fun MutableRealm.write()

Creates a write transaction in which the initial data can be written with MutableRealm as a receiver. This mirrors the API when using Realm.write and allows for the following pattern:

val config = RealmConfiguration.Builder()
.initialData { // this: MutableRealm
copyToRealm(Person("Jane Doe"))
}
.build()
val realm = Realm.open(config)