csv_reader 1.0.2 copy "csv_reader: ^1.0.2" to clipboard
csv_reader: ^1.0.2 copied to clipboard

An easy to implement csv reader that treats the CSV file as a 2D array & allows the selection of specific cells within a line of code

CSV Reader #

A Library for reading CSV Files through file URLs or raw-text urls

Getting started #

CSV Reader makes reading CSV easier

Suppose we have a 6 rows x 5 columns CSV File

The default delimiter is a comma "," but you can change it.
Title parameter says: Does my file has a title? yes = true

var myCSV = CSV.from(url :'URL_TO_FILE_OR_RAW_TEXT', delimiter: ",", title:true );
await myCSV.initFinished; // if you want to await
print(myCSV.columnCount); // prints 5
print(myCSV.rowCount); // prints 6

print(myCSV.shape);
// prints "6x5", sometimes it shows without a title if you specified title:true
// this excludes the row of the title which is the first row of the csv file

Getting data

print(myCSV[row][column]); // This is basically it
this prints the intersection of a row with a column which is basically a cell, so the first cell is myCSV[0][0]

If you want to add a new functionality #

Extend the CSV class & add it directly or ask for it & it will be added.

10
likes
30
pub points
43%
popularity

Publisher

unverified uploader

An easy to implement csv reader that treats the CSV file as a 2D array & allows the selection of specific cells within a line of code

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on csv_reader