-
Notifications
You must be signed in to change notification settings - Fork 270
enforce constraints to fix highlight start position #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
enforce constraints to fix highlight start position
@mohamadlounnas I see that this PR forcibly expands a widget tree to infinite width. With this change, which widget determines the final width of the custom paint? @angelosilvestre do you have any thoughts on this change? |
hey @matthew-carroll The So the solution is simply to give the canvas a defined size, so it's not forced to overflow its parent. There are several ways to fix this. One solution is to use |
@mohamadlounnas Did you find out why the |
This is expected behavior because in RTL, content starts from the right side. look at the image I attached in the first comment |
I reproduced the considered bug and it still occurs. @mohamadlounnas has solved the bug partially but not completely. If you do not have a better solution for the bug please merge it with main @matthew-carroll and @angelosilvestre. My issue was the similar with this. #2472 . And i have another request. The text direction is detected from input text in the ParagraphComponentBuilder. But if we do not have any character in the document it cannot starts from right for rtl languages. It starts from left and after the first input character it aligns to right. But we want that the caret should start from right and input characters should be the right side of the caret. As a solution for this issue you need to get a optional parameter as a textDirection for the ParagraphComponentBuilder. And after that we can set the direction of document dynamically. You can get Flutter TextFormField widget as a reference for the text direction @matthew-carroll @angelosilvestre |
read #2616