-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Can we have easier to work with listeners, max lenght and textformating on changes made easier? #333
Comments
This would definatly be a nice feature |
Thanks for opening the issue. These are indeed nice features to have. Recently, I've been thinking about providing a way to add background/foreground decorations but haven't started working on it yet. I will be busy for the next week or two but after that I will definitely start working on some of these missing features. In the mean time, feel free to contribute if you want. @Kontrano @ember11498 |
@Amir-P just as an example I tried this code:
And despite it working it throws an exception and the bar disappears/loses focus. I got this error:
|
Also, if I want to formatText to background red when user overflows 300 characters per example the formatText itself triggers the listener again and again going on an infinite loop. I would help you doing the code but I am not the right person as I have got into coding and dart in general only 1 year ago, not experienced enough for the task. |
Can we please have an easy way to set a maximum text length or at least make the overflow text (text after the max length) be colored background red or something. I have tried controller.addlistener and controller.document.changes.listen but it's not easy at all, there is always some thrown exception or odd behavior.
I have played with it for several hours and I could not get what I want which ultimately is to set maximum length to 350 characters and all characters between 300 and 350 should be background red.
My problems were, when I try to set max characters by replacingtext it indeed works but it throws an exception and loses focus. And when I try to set the background it enters in an infinite loop of never stopping triggering the listen stream
The text was updated successfully, but these errors were encountered: