toMap method

Map<String, dynamic> toMap()

Implementation

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