Going out or not is not the main problem.
As long as you wash your hands more often, don't touch your eyes, nose or mouth when out in the public, and you re less likely to contact the flu.
Even if you stay home, some family members who come back from the outside are still able to pass the germs to you. That is why I always want my family members to wash their hands thoroughly when return to home.