Really? How does anyone become an adult without knowing how to deal with other people?
If someone is flirting with you, and you find it pleasant, flirt back. If you don't find it pleasant, don't flirt back, but don't cut people off, just refer to your other half, mention that you aree feeling tired / want to watch this movie / have work to do, so that you don't make them feel bad.
If they persist, say politely but firmly that it is making you uncomfortable and that you aren't interested.
Easy.
But really, flying is BORING, a bit of flirting can help pass the time.