I have the following code:
Get.put(DbController(HabitDao(AppDb())));
When I hot reload my app, I get the following error:
"WARNING (moor): It looks like you've created the database class AppDb multiple times. When these two databases use the same QueryExecutor, race conditions will occur and might corrupt the database."
I need to check if I have put a DbController
before creating a new AppDb
instance. I never had this problem while using the Provider package.
What is the best practice to solve this?