finishText method

  1. @override
InlineSpan finishText()
override

finish SpecialText

Implementation

@override
InlineSpan finishText() {
  if (customWordIndex.isEmptyList || customWordCall == null || !(customWordIndex?.contains(index) ?? false)) {
    return WidgetSpan(
      child: PinyinMarkWidget(
        text: text,
        pinyin: pinyin,
        textStyle: textStyle,
        pinyinStyle: TextStyle(color: markTextColor, fontSize: markTextSize),
        lineSpacing: lineSpacing,
      ),
    );
  } else {
    return WidgetSpan(
        child: Padding(
      padding: EdgeInsets.only(left: 2, right: 2, bottom: lineSpacing ?? 0),
      child: customWordCall!(index ?? 0, text, pinyin ?? ""),
    ));
  }
}