I freeze a decorated piece of birthday cake or cupcake that is safe for my kids to eat and they bring it along to whatever birthday party to which they are invited.
It has been a great way for me to help my kids feel a part of the group since they get to eat a piece of special birthday cake alongside everyone else. Its easy, since I’m making a birthday cake already. And I love how I can have peace of mind, knowing there is no worry about an allergic reaction.
I'm sure this same strategy could be applied in many social gathering situations. You could probably freeze a meal that your child can eat to bring along to a potluck or BBQ when you aren't sure what will be served. Its an easy way to side-step awkwardness ("They can't eat that....) but provide safe options for your child.