Question about "Isolate: It looks like you've created the database class multiple times" message. #1782
Replies: 1 comment 1 reply
-
If you're seeing that message, you're instantiating the same database class, multiple times, on the same isolate. A If you want the whole synchronization of records to happen on a background isolate, use something like I don't see much use of creating two databases, one with a
Yes! A |
Beta Was this translation helpful? Give feedback.
-
Hello!
This is my scenario:
I have
Timer.periodic
started after login to continuous check database records and send to API (or retrieve). I want it to be on isolates.Apparently it's working, data is being recorded and timer is being persisted through screens. My question is about the error above.
I'm creating 2 databases, standard way and isolate way. After I create isolate database, can I use it normally through the whole app, and even register it with services locator (like Get It), for example?
Beta Was this translation helpful? Give feedback.
All reactions