tekartik / sqflite

SQLite flutter plugin
BSD 2-Clause "Simplified" License
2.86k stars 521 forks source link

[Web] Access the database file or read database as bytes #1074

Closed CBeening closed 8 months ago

CBeening commented 8 months ago

Hi,

is there currently any way in which we can access the actual database file, or alternatively directly read the database as bytes?

The dart.io library is not available on the web, the using File and such are not possible.

The idea would be to make the database "downloadable" when running in web, so its easier to access it for debugging purposes.

Regards

alextekartik commented 8 months ago

You cannot access the actual database file since it is not a file. You can read the database as bytes using readDatabaseBytes().

CBeening commented 8 months ago

You cannot access the actual database file since it is not a file. You can read the database as bytes using readDatabaseBytes().

Thanks a lot, looks like this has just been added!