Changed the implementation of the underline styling during IME conversion. Instead of manually drawing a line beneath the composing text, the underline is now applied directly as a text style to the conversion range. This simplifies the implementation and brings it in line with Flutter's standard TextEditingController behavior.
In the previous implementation, there was an issue where the composing style appeared like a strikethrough, positioned around the middle of the text, especially when the text height was higher than usual, such as with headers. This issue has been completely resolved with the current fix.
before:
after:
Related Issues
Improve #2179
[ ] โจ New feature: Adds new functionality without breaking existing features.
[x] ๐ ๏ธ Bug fix: Resolves an issue without altering current behavior.
[ ] ๐งน Code refactor: Code restructuring that does not affect behavior.
Description
Changed the implementation of the underline styling during IME conversion. Instead of manually drawing a line beneath the composing text, the underline is now applied directly as a text style to the conversion range. This simplifies the implementation and brings it in line with Flutter's standard
TextEditingController
behavior.TextEditingController#buildTextSpan
https://github.com/flutter/flutter/blob/2277e055508ee6e11ea1313a06ec5b353e76eecc/packages/flutter/lib/src/widgets/editable_text.dart#L285-L309In the previous implementation, there was an issue where the composing style appeared like a strikethrough, positioned around the middle of the text, especially when the text height was higher than usual, such as with headers. This issue has been completely resolved with the current fix.
before:
after:
Related Issues
Improve #2179
[ ] โจ New feature: Adds new functionality without breaking existing features.
[x] ๐ ๏ธ Bug fix: Resolves an issue without altering current behavior.
[ ] ๐งน Code refactor: Code restructuring that does not affect behavior.
[ ] โ Breaking change: Alters existing functionality and requires updates.
[ ] ๐งช Tests: Adds new tests or modifies existing tests.
[ ] ๐ Documentation: Updates or additions to documentation.
[ ] ๐๏ธ Chore: Routine tasks, or maintenance.
[ ] โ Build configuration change: Changes to build or deploy processes.
Suggestions