parseTextAnchor function
Parses a text-anchor attribute.
Implementation
DrawableTextAnchorPosition? parseTextAnchor(String? raw) {
switch (raw) {
case 'inherit':
return null;
case 'middle':
return DrawableTextAnchorPosition.middle;
case 'end':
return DrawableTextAnchorPosition.end;
case 'start':
default:
return DrawableTextAnchorPosition.start;
}
}