Flutter Web how to read and write file (xlsx,txt etc)

1k Views Asked by At

I am trying to read the two files first one is a text file and the second one is an excel file. I'm using flutter web 2.10 but can't find a way to read those files. I have tried this method but it doesn't work now To read and Write File in Flutter Web

Currently, I am kinda stuck with it. For now, I am reading the text file as a string and then parsing it, but it is not a good way to do it. So if you have any better way to read files in flutter web please do share.

 Uint8List? bytes=result.files.first.bytes;
 file=File.fromRawPath(bytes!);
 file.readAsLines();
 returnResult=file.toString();
0

There are 0 best solutions below