registerCollection<Y> method
void
registerCollection<Y>(})
Implementation
void registerCollection<Y>(
String collection, {
bool syncCollectionToServer = false,
Duration cacheLifespan = const Duration(hours: 6),
}) {
if (_collections.any((element) => element.name == collection)) {
return;
} else {
_collections.add(
DataCollection<Y>(collection, syncToServer: syncCollectionToServer),
);
}
}