Adding listener to a textfield

I have a textfield whose contents change programmatically. I tried to use TextField.onChanged handler but with no luck. Searched help and read that: “programmatic changes to the text field do not trigger the onChanged event”.
Is there any other way to do this?