parseTextBaseline static method

CanvasTextBaseline? parseTextBaseline(
  1. String value
)

Implementation

static CanvasTextBaseline? parseTextBaseline(String value) {
  switch(value) {
    case TOP:
      return CanvasTextBaseline.top;
    case HANGING:
      return CanvasTextBaseline.hanging;
    case MIDDLE:
      return CanvasTextBaseline.middle;
    case ALPHABETIC:
      return CanvasTextBaseline.alphabetic;
    case IDEOGRAPHIC:
      return CanvasTextBaseline.ideographic;
    case BOTTOM:
      return CanvasTextBaseline.bottom;
  }
  return null;
}