fromServerMap property
Optional custom function to deserialize server data into Realm objects.
If not provided, uses generated fromEJson() from .realm.dart files.
Use this for custom field mapping or data transformation.
Example:
fromServerMap: (map) => ChatMessage(
map['_id'],
map['text'],
map['sender_name'],
map['sender_id'],
DateTime.parse(map['timestamp']),
)
Implementation
final RealmObject Function(Map<String, dynamic> serverMap)? fromServerMap;