We dream about flags because of reasons like patriotism and peace. Mainly the flag appears when it has been raised as a symbol of victory. It could also mean that we are defending our territory while dreaming of the flag, or it may symbolize triumph and success in any given endeavor.
If the flag in our dreams is torn up, then it means that we are not feeling at peace with ourselves or those around us.
Sometimes, in a dream, people see the flag half-mast. It can signify sadness, regret, or an event of loss. For example, it could be from a recent death of someone close to that person or just simply seeing a flag at half-mast for another reason in real life can trigger this feeling of sadness.