ruutConversationDaoProvider top-level property
Provides an instance of ruut user dao
Creates an in memory storage if persistence isn't enabled in params else hive boxes are create to store ruut client's conversation
Implementation
final ruutConversationDaoProvider =
Provider.family<RuutConversationDao, RuutParameters>((ref, params) {
if (!params.isPersistenceEnabled) {
return NonPersistedRuutConversationDao();
}
final conversationBox = ref.read(conversationBoxProvider);
final clientInstanceToConversationBox =
ref.read(clientInstanceToConversationBoxProvider);
return PersistedRuutConversationDao(conversationBox,
clientInstanceToConversationBox, params.clientInstanceKey);
});