parentTypeToString function

String parentTypeToString(
  1. ParentType type
)

Returns the string value of the given parent type.

Implementation

String parentTypeToString(ParentType type) {
  switch (type) {
    case ParentType.Workspace:
      return 'workspace';
    case ParentType.Database:
      return 'database_id';
    case ParentType.Page:
      return 'page_id';
    case ParentType.None:
      return '';
  }
}