init method
Public APIs to be implemented by any Persistor extension like FilePersistor.
Initialization function called when the persistor is instantiated to execute and setup work.
Implementation
@override
init() async {
await spawnWorker(
FilePersistorWorker.new,
config: FilePersistorWorkerConfig(
persistenceThrottle: persistenceThrottle,
settings: settings,
encrypter: encrypter,
directory: await initDirectory(),
),
);
}