Is it possible to track the pixels of a cursor in the text_editor widget?

I’m trying to build a tracker for the cursor in a text_editor but am having a hard time building a custom rectangle that stacks on top of the text_editor. Any help here would be highly appreciated!