My goal is to convert a CSV into a list in order to populate a firebase database

This fonctionnality will be available on a dashboard working with flutter web.
I have to do some verifications and add some conditions in order to have clean data inserted
Remove the first row of the list (headers),
Check if the headers match with what I want to insert etc.

PROBLEM

I tested several csv files, some are working but some aren’t. What’s the origin of this, is it an format reason?
How to make every csv fonctionnal/readable?

I added some csv for testing into the csv folder
for example
kindacode.csv and data-2.csv are working. Everything is in a listitem.
image

MOCK_DATA.csv isn’t working. It’s a big chunk.
image

GitHub

View Github