Closed crizant closed 2 years ago
In my own fork I changed WidgetSpan
to TextSpan
to fix vertical alignments, but in that case we can't add decoration and padding to the keywords:
return TextSpan(
children: [
TextSpan(
text: showWord,
style: words[currentWord]!.textStyle ?? textStyle,
recognizer: TapGestureRecognizer()
..onTap = words[currentWord]!.onTap ?? () {},
),
_buildSpan(boundWords),
],
);
@crizant so where can I find your fork?
@crizant so where can I find your fork?
It’s in my working account. I made it at work so technically it’s not okay to share it publicly. Maybe you should make your own, the core change is in my previous comments.
thank you. I cannot remove WidgetSpan, but I added a new argument to TextHighlight named spanAlignment, that you can set it to PlaceholderAlignment.middle
Maybe we should add
alignment: PlaceholderAlignment.middle
to theWidgetSpan
?