Search code examples
sqlitefirebaseflutterdartdatabase-backups

How to add option for user to backup his personal files(Text) from a mobile app with that backup connected to his google account?


This is a simple Memo App for writing memos in which I want to add an option for the user to back up his writings online.

User must login through his google account first. and the app already saves user files locally in a database file. So, I want to find a way to store that DB file onto storage that is user-specific(Firebase/Google Drive).


Solution

  • Use Firebase Firestore rather than a local database. This way everything will be saved into the cloud and you get firebase's offline capabilities and syncing too.

    This plugin is useful for setup: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore