getAlignPosition method

double getAlignPosition(
  1. double height
)

Gets offset height based on waveform align

Implementation

double getAlignPosition(double height) {
  switch (this) {
    case WaveformAlignment.top:
      return 0;
    case WaveformAlignment.center:
      return height / 2;
    case WaveformAlignment.bottom:
      return height;
  }
}