SyncCollectionConfig<T extends dynamic> constructor
SyncCollectionConfig<T extends dynamic> ({
- required dynamic results,
- required String collectionName,
- required String idSelector(
- dynamic model
- required bool needsSync(
- dynamic model
- Map<
String, dynamic> toSyncMap(- dynamic model
- dynamic fromServerMap()?,
- List<
String> ? propertyNames, - Map<
String, List< ? embeddedProperties,String> > - Map<
String, dynamic Function(Map< ? embeddedCreators,String, dynamic> )> - T create()?,
- void applyAckSuccess(
- dynamic model
- void applyNoDiff(
- dynamic model
- Map<
String, dynamic> sanitize()?, - Map<
String, dynamic> emitPreProcessor()?, - dynamic decode()?,
Implementation
SyncCollectionConfig({
required this.results,
required this.collectionName,
required this.idSelector,
required this.needsSync,
this.toSyncMap,
this.fromServerMap,
this.propertyNames,
this.embeddedProperties,
this.embeddedCreators,
this.create,
this.applyAckSuccess,
this.applyNoDiff,
this.sanitize,
this.emitPreProcessor,
RealmObject Function(Map<String, dynamic> data)? decode,
}) : decode = decode ?? ((Map<String, dynamic> map) {
if (fromServerMap != null) {
return fromServerMap(map);
}
return RealmJson.fromEJsonMap<T>(
map,
create: create,
propertyNames: propertyNames,
embeddedCreators: embeddedCreators,
);
});