propertyTypeToString function

String propertyTypeToString(
  1. PropertiesTypes type
)

Returns the string value of the given property type.

Implementation

String propertyTypeToString(PropertiesTypes type) {
  switch (type) {
    case PropertiesTypes.RichText:
      return 'rich_text';
    case PropertiesTypes.Number:
      return 'number';
    case PropertiesTypes.Select:
      return 'select';
    case PropertiesTypes.MultiSelect:
      return 'multi_select';
    case PropertiesTypes.Date:
      return 'date';
    case PropertiesTypes.People:
      return 'people';
    case PropertiesTypes.File:
      return 'file';
    case PropertiesTypes.Checkbox:
      return 'checkbox';
    case PropertiesTypes.URL:
      return 'url';
    case PropertiesTypes.Email:
      return 'email';
    case PropertiesTypes.PhoneNumber:
      return 'phone_number';
    case PropertiesTypes.Formula:
      return 'formula';
    case PropertiesTypes.Relation:
      return 'relation';
    case PropertiesTypes.Rollup:
      return 'rollup';
    case PropertiesTypes.CreatedTime:
      return 'created_time';
    case PropertiesTypes.CreatedBy:
      return 'created_by';
    case PropertiesTypes.LastEditedTime:
      return 'last_edited_time';
    case PropertiesTypes.LastEditedBy:
      return 'last_edited_by';
    case PropertiesTypes.Title:
      return 'title';
    case PropertiesTypes.None:
      return '';
  }
}