toMap method
Converts to a map.
Implementation
Map<String, dynamic> toMap() => {
'userId': userId,
if (lastSyncTime != null) 'lastSyncTime': lastSyncTime!.toUtc().toIso8601String(),
if (dataHash != null) 'dataHash': dataHash,
if (deviceId != null) 'deviceId': deviceId,
if (customMetadata != null) 'customMetadata': customMetadata,
if (entityCounts != null)
'entityCounts': entityCounts!.map(
(key, value) => MapEntry(key, value.toMap()),
),
};