How do I sync a server database and a local SQFlite database in Flutter?

1,732 views
Skip to first unread message

Vijay Dhakal

unread,
Apr 13, 2019, 10:41:09 PM4/13/19
to Flutter Dev

I have an Async Task that fetches information from a web service API and displays in the UI. This requires me to fetch the info every time the application starts, which takes a long time for info to appear when you start the app.

I would like to store the fetched information in a local SQLite Database and sync it every once in a while with the data from the web service.

I would also like to fill some form locally offline and send to a server when the internet is connected. What would be the best approach to do that?

marcel...@gmail.com

unread,
Apr 15, 2019, 2:35:36 AM4/15/19
to Vijay Dhakal, Flutter Dev
Firebase

Von meinem iPhone gesendet
--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pedro Massango

unread,
Apr 15, 2019, 4:36:43 AM4/15/19
to marcel...@gmail.com, Vijay Dhakal, Flutter Dev
This is called repository pattern,
I made an article about it focused on android development but it might help you: https://blog.usejournal.com/android-studio-mvvm-single-source-of-truth-pattern-2e0bea70b747

gdatas...@gmail.com

unread,
Apr 21, 2019, 4:52:52 PM4/21/19
to Flutter Dev
Please share the solution here if you find one. I have same question.
Reply all
Reply to author
Forward
0 new messages