blockTypeToString function
Returns the string value of the given block type
.
Implementation
String blockTypeToString(BlockTypes type) {
switch (type) {
case BlockTypes.Unsupported:
return 'unsupported';
case BlockTypes.ToDo:
return 'to_do';
case BlockTypes.H1:
return 'heading_1';
case BlockTypes.H2:
return 'heading_2';
case BlockTypes.H3:
return 'heading_3';
case BlockTypes.Paragraph:
return 'paragraph';
case BlockTypes.BulletedListItem:
return 'bulleted_list_item';
case BlockTypes.NumberedListItem:
return 'numbered_list_item';
case BlockTypes.Toggle:
return 'toggle';
case BlockTypes.Child:
return 'child_page';
case BlockTypes.None:
return '';
}
}