pinyinMarkText method

EySpecialText? pinyinMarkText(
  1. String? textStack,
  2. int? index,
  3. String? textPinyin,
  4. TextSpanStyle? spanStyle,
)

Implementation

EySpecialText? pinyinMarkText(String? textStack, int? index, String? textPinyin, TextSpanStyle? spanStyle) {
  var markText = PinyinMarkText(
    text: textStack ?? "",
    index: index,
    pinyin: textPinyin,
    textStyle: spanStyle == null
        ? textStyle
        : TextStyle(
            color: spanStyle.color,
            fontSize: spanStyle.fontSize,
            fontWeight: spanStyle.fontWeight,
            letterSpacing: textStyle.letterSpacing),
    markTextColor: spanStyle == null ? markTextColor : spanStyle.markTextColor,
    markTextSize: spanStyle == null ? markTextSize : spanStyle.markFontSize,
    lineSpacing: lineSpacing,
    customWordIndex: customWordIndex,
    customWordCall: customWordCall,
  );
  markText.isMarkPinyin = true;
  return markText;
}