There is a statement in Mahabharata that refutes the idea that earth is flat in shape.
The bold portion of the following conversation between Vyasa and Kunti confirms that earth is not a flat body.
'Vaisampayana continued, 'Vyasa, the son of Satyavati, thus comforting
the Pandavas, led them into the town of Ekachakra. And the master also