Implement new background Isolate Channels API
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
So I want to access Hive box from another isolate but in the docs, it says that hive doesn't support multi-thread operations on a box (only one isolate can open and have access to a box at a time), this is a problem when someone wants to access write or read hive db data from another isolate.
**Describe the solution you'd like**
Maybe by using the new Background Isolate Channels API, any hive box can be opened on the main/root isolate and can be accessed by other isolates using the new API
**Describe alternatives you've considered**
there is no way to access hive data on other isolates unless you close the boxes in the main isolate and open them again in the other isolate.
Here is a link to a medium article that talks about the new API for background isolate channels: [https://medium.com/@gaaclarke/introducing-background-isolate-channels-7a299609cad8](https://medium.com/@gaaclarke/introducing-background-isolate-channels-7a299609cad8)
**Version**
- Platform: iOS, Android
- Flutter version: 3.7
- Hive version: ...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the linked Background Isolate Channels API article and Hive's documented restriction that only one isolate can access a box at a time. Determine the API design needed for other isolates to read and write boxes opened on the main isolate, then verify that the behavior works on the stated iOS and Android platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- database, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100