toMap method
Implementation
Map<String, dynamic> toMap() {
final map = {
'associationType': associationType.name,
'targetNames': targetNames,
'associatedName': associatedName,
'associatedType': associatedType,
};
return Map<String, dynamic>.from(map)
..removeWhere((k, dynamic v) => v == null);
}