Is “sweet dreams” flirty?

Do you consider telling someone of the opposite sex “have a good night, sweet dreams” to come off as flirty or endearing? My husband texted this to a female coworker of his and it’s just rubbing me the wrong way.