createSpecialText method

  1. @override
SpecialText? createSpecialText(
  1. String flag, {
  2. TextStyle? textStyle,
  3. SpecialTextGestureTapCallback? onTap,
  4. int? index,
})

Implementation

@override
SpecialText? createSpecialText(String flag,
    {TextStyle? textStyle,
    SpecialTextGestureTapCallback? onTap,
    int? index}) {
  if (flag == '') {
    return null;
  }
  if (flag.endsWith('[')) {
    return EmojiText(textStyle, start: index! - (EmojiText.flag.length - 1));
  }
  return null;
}