repository<D extends EntityModel, R extends EntitySearchModel> method
DataRepository<D, R>
repository<D extends EntityModel, R extends EntitySearchModel>(
- BuildContext context
Implementation
DataRepository<D, R>
repository<D extends EntityModel, R extends EntitySearchModel>(
BuildContext context,
) {
switch (ReferralReconSingleton().persistenceConfiguration) {
case PersistenceConfiguration.offlineFirst:
return context.read<LocalRepository<D, R>>();
case PersistenceConfiguration.onlineOnly:
return context.read<RemoteRepository<D, R>>();
default:
return context.read<LocalRepository<D, R>>();
}
}