I have no idea why your ex asked you this question, but I strongly encourage people in close relationships to have this conversation.
My husband was in an accident that left him braindead. Having discussed our wishes with each other made some difficult decisions easier because I knew what he wanted.
I had power of attorney for my mother at the end of her life. Again, having discussed what she would want ahead of time made tough decisions easier.