Closed Saransh-cpp closed 3 years ago
Yes, we can store the images into strings rather than that can we store the file paths present there to the hive box and retrieve them directly in the app.
File file = await // get the document here
final path = file.path
var box = await Hive.openBox('doc');
var m = doc()
..name = 'Name of pdf'
..path = path ;
box.add(m);
m.save();
Hope this medium article helps.
Yes, we can store the images into strings rather than that can we store the file paths present there to the hive box and retrieve them directly in the app.
File file = await // get the document here final path = file.path var box = await Hive.openBox('doc'); var m = doc() ..name = 'Name of pdf' ..path = path ; box.add(m); m.save();
Hope this medium article helps.
Thanks! I will look into this
Bugs
Solution
I am thinking of converting the images to strings and then storing them in the Hive box as the 'File' data type is the one giving us this error.
I will work on this and make a PR whenever I fix this.