The above link is for auto indenting text when inserting it in TextInput.
What I did above is getting the root widgets rule's string.