stringToParentType function

ParentType stringToParentType(
  1. String type
)

Returns the parent type of the given parent type string.

Implementation

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