getChangesPayload method

Map<String, dynamic> getChangesPayload()

Implementation

Map<String, dynamic> getChangesPayload() {
  final payload = <String, dynamic>{};
  if (name.hasPendingChanges) payload[_name] = name.getOperations();
  if (surname.hasPendingChanges) payload[_surname] = surname.getOperations();
  if (externalSegments.hasPendingChanges) payload[_externalSegments] = externalSegments.getOperations();
  if (gender.hasPendingChanges) payload[_gender] = gender.getOperations();
  if (dateOfBirth.hasPendingChanges) payload[_dateOfBirth] = dateOfBirth.getOperations();
  if (maritalStatus.hasPendingChanges) payload[_maritalStatus] = maritalStatus.getOperations();
  if (childCount.hasPendingChanges) payload[_childCount] = childCount.getOperations();
  if (country.hasPendingChanges) payload[_country] = country.getOperations();
  if (state.hasPendingChanges) payload[_state] = state.getOperations();
  if (city.hasPendingChanges) payload[_city] = city.getOperations();
  if (district.hasPendingChanges) payload[_district] = district.getOperations();
  if (occupation.hasPendingChanges) payload[_occupation] = occupation.getOperations();
  if (industry.hasPendingChanges) payload[_industry] = industry.getOperations();
  if (favoriteTeam.hasPendingChanges) payload[_favoriteTeam] = favoriteTeam.getOperations();
  if (language.hasPendingChanges) payload[_language] = language.getOperations();
  return payload;
}