getTranslateYFactorForTextAlignment function

double getTranslateYFactorForTextAlignment(
  1. TextAlignment textAlignment
)

Implementation

double getTranslateYFactorForTextAlignment(TextAlignment textAlignment) {
  switch (textAlignment) {
    case TextAlignment.up:
      return 0.0;
    case TextAlignment.mid:
      return 0.5;
    case TextAlignment.bottom:
      return 1.0;
  }
}