getLineSpaceHeight static method

double getLineSpaceHeight(
  1. LyricsLineModel element,
  2. LyricUI ui, {
  3. bool excludeInline = false,
})

获取行间距

Implementation

static double getLineSpaceHeight(LyricsLineModel element, LyricUI ui,
    {bool excludeInline = false}) {
  double spaceHeight = 0;
  if (element.hasExt || element.hasMain) {
    spaceHeight += ui.getLineSpace();
  }
  if (element.hasExt && element.hasMain && !excludeInline) {
    spaceHeight += ui.getInlineSpace();
  }
  if (!element.hasExt && !element.hasMain) {
    spaceHeight += ui.getBlankLineHeight();
  }
  return spaceHeight;
}