In almost every case I "flirted", it was clearly sarcastic or as part of a joke. I know how uncomfortable or offensive it can be to some people, so I'm quite careful. Though in the past I was a lot less tactful. For pet names these days, it's exclusive to pets.
If anyone flirts with me, they may have to go further because while I'm good at reading something between others, I'm a wee hopeless with understanding how somebody feels about me, unless it's in the spectrum of "hatred".