-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] ReadOnly Box #43
Comments
I will look into this... |
I would also find this super helpful. Let me know if you need a hand. |
Any update on this? Also, if this is implemented, can you read directly from assets (for flutter) instead of having to copy over the box? |
@re-bola I'm still working on this and yes you will be able to open a box directly from the assets. It will look somehow like this:
Would that be okay? |
Looks good. Will it still support LazyBoxes? |
Not in combination with read only boxes from bytes. It makes no sense since you cannot write to boxes from bytes anyways... But the regular lazy boxes will still be there... |
This has been resolved in |
Seems |
@X-Wei I think the var _bytes = await rootBundle
.load(path)
.then((value) => value.buffer.asUint8List());
_box = await Hive.openBox(
name,
bytes: _bytes,
); |
Thanks @fredrikbaberg ! But explicitly adding read-only boxes would be helpful, e.g. we could make concurrent access to read-only boxes possible. @leisim WDYT? |
Request for ReadOnly Box which can read data without write permission(Ex.from flutter assets)
The text was updated successfully, but these errors were encountered: