I am trying to create a Flutter app with a Database which is primarily offline on the device. Later on, the user should have the possibility to flip a switch and the database is synced online, so he can log in from a different device and has the same data. I read a lot about using Firestore, and already implemented it in the app, but the problem is that it is always online and not really made for using it only offline. I thought about using sqflite, but then I have the synchronization problem and read that the business logic behind a synchronization isn't trivial. Is there an easy way to do that?