InitialDataCallback typedef

InitialDataCallback = void Function(Realm realm)

The signature of a callback that will be executed only when the Realm is first created.

The Realm instance passed in the callback already has a write transaction opened, so you can add some initial data that your app needs. The function will not execute for existing Realms, even if all objects in the Realm are deleted.

Implementation

typedef InitialDataCallback = void Function(Realm realm);