When the Bible uses figurative language it's done through intense poetic diction, visions, dreams and parables. In contrast the historical books of are straightforward narratives. Furthermore, Jesus referred to Adam, Noah and the flood as real historiucal events with such phrases as "in the days of Noah"
"just as in Noah's day" "In the begining" referring to the first nan and woman. All the biblical writers treat the accounts as factual as well.
King James Bible
For as in the days that were before the flood they were eating and drinking, marrying and giving in marriage, until the day that Noe entered into the ark,