What you experienced is referred to in the medical literature as a "scintillating scotoma." The scintillating part refers to the flashing, the scotoma part refers to a blob/dark area that obscures your vision.
This is a common "aura" that is experienced with migraine headaches. I get scintillating scotomas about twice per year, which are followed sometimes, but not always, by a mild headache. I find that resting and putting a cool cloth over my eyes is very effective.
One time I experienced this during my pregnancy, so naturally I was concerned. I went immediately to the emergency room and was given a CAT scan... negative for any problems. They said it was likely a migraine aura.