finishText method
finish SpecialText
Implementation
@override
InlineSpan finishText() {
final String _key = toString();
final String imagePath = Constants.emojiMap.keys
.firstWhere((key) => Constants.emojiMap[key] == _key, orElse: () => '');
if (imagePath.isNotEmpty) {
return ImageSpan(
AssetImage(imagePath, package: 'tencent_float_chat_widget'),
imageWidth: 20.0,
imageHeight: 20.0,
start: start!,
actualText: _key,
);
}
return TextSpan(text: toString(), style: textStyle);
}