-
In the documentation you explained clearly how to use the database with isolates , but i don't know yet if is it possible to use the database with the flutter background service plugin? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
I don't have a lot of experience with the background service package, but this stands out:
This means that, by default, you can't share a moor database between the UI and a background service. You can open the database separately of course. The only real downside is that real-time stream queries wouldn't work. If you also need stream queries, you can implement a moor remote database over the communication primitives provided by that package. This would allow you to use everything moor has to offer across that database. You can use moor over any two-way communication channel (isolates, web workers, TCP sockets, ...) by representing it as a |
Beta Was this translation helpful? Give feedback.
-
@simolus3 |
Beta Was this translation helpful? Give feedback.
-
I was able to share data between the flutter background service and the app . So in conclusion the database is modified in the server side only and listens to the updates in the app side. |
Beta Was this translation helpful? Give feedback.
I don't have a lot of experience with the background service package, but this stands out:
This means that, by default, you can't share a moor database between the UI and a background service. You can open the database separately of course. The only real downside is that real-time stream queries wouldn't work.
If you also need stream queries, you can implement a moor remote database over the communication primitives provided by that package. This would allow you to use everything moor has to offer across that database. You c…