If you are planning to buy your own meal to cook , be aware that the supermarkets close early in Flam. So do your shopping before going to hike...otherwise you will be with nothing to eat as we did...
There's lots of lovely fruit trees growing in Flam. So if you're down to your last cent, just ask the orchard owner if it is alright for you to pick an apple / plum from their tree. Chances are, the nice folks here will oblige.
Alternatively, you could cater food for yourself by buying yummy instant noodles, canned tuna, eggs, etc from the little supermarket in Flåm. Since this is a tiny place, it shouldn't be too difficult to find the supermarket. Look out for the giant sign.