dooContactDaoProvider top-level property
Provides an instance of DOO user dao
Creates an in memory storage if persistence isn't enabled in params else hive boxes are create to store DOO client's contact
Implementation
final dooContactDaoProvider =
Provider.family<DOOContactDao, DOOParameters>((ref, params) {
if (!params.isPersistenceEnabled) {
return NonPersistedDOOContactDao();
}
final contactBox = ref.read(contactBoxProvider);
final clientInstanceToContactBox =
ref.read(clientInstanceToContactBoxProvider);
return PersistedDOOContactDao(
contactBox, clientInstanceToContactBox, params.clientInstanceKey);
});