13

I have data stored locally in sqlite. I have a remote MySql server. In android I could setup SyncAdapter to handle the syncing between the localdb and the remotedb.

When a record is saved locally and there is an internet connection it should push the data to the server in the background. It should also periodically update the data stored in SqLite.

Now I'm trying to find the equivalent of SyncAdapter in flutter to do this but I can't seem to find one. How would I implement this functionality in flutter without having to use firebase?

5
  • Have you got any solution? Commented Mar 11, 2021 at 7:16
  • Nope. Implementing my own solution using Sqlite and Background Services. Commented Mar 12, 2021 at 9:40
  • This is one of the reasons I went after Firebase. Did a lot of research without any success in this one. did u find any solutions yet? Commented Jul 13, 2021 at 9:44
  • I think this question falls under help/don't ask help center Commented Jul 25, 2021 at 8:21
  • You can use ObjectBox to store the data and sync it. Have a look at this youtu.be/AxYbdriXKI8 Commented Aug 21, 2021 at 6:04

2 Answers 2

1

You can use realm-db for it. You can't sync local-db to remote easily. But everything is so easy with realm-db

Sign up to request clarification or add additional context in comments.

Comments

0

for this work, you need to add one boolean column in your database which checks if data send to the web or not. then use WorkManager to check periodically if data is updated to host or not. for this work, you can use Flutter Work manager.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.