pinyinMark method

EySpecialText? pinyinMark(
  1. String? data,
  2. String? textStack,
  3. int? index,
  4. SpecialTextGestureTapCallback? onTap,
)

Implementation

EySpecialText? pinyinMark(String? data, String? textStack, int? index, SpecialTextGestureTapCallback? onTap) {
  var spanStyle = spanStyleMap[index];
  if (customWordIndex.isNotEmptyList && customWordCall != null && (customWordIndex?.contains(index) ?? false)) {
    return pinyinMarkText(textStack, index, "", spanStyle);
  } else {
    if (textStack?.isChineseCharacter ?? false) {
      String textPinyin = wordsPinyinMap![textStack!.trim()] ?? "";
      if (textPinyin.isEmptyString) {
        if (enablePinYinCheck) {
          hasPinYin = false;
          if (pinYinParsingCall != null) {
            pinYinParsingCall!();
          }
        }
        return null;
      }
      return pinyinMarkText(textStack, index, textPinyin, spanStyle);
    }
  }
  return null;
}