firebase_backup_restore

Last updated:

0 purchases

firebase_backup_restore Image
firebase_backup_restore Images
Add to Cart

Description:

firebase backup restore

firebase_backup_restore #
A flutter plugin for backup and restoring firebase cloud documents.
Register with firebase #


add firebase_core and cloud_firestore dependencies.


for android - Add google-services.json to your android/app folder.


for ios - Add GoogleService-info.plist to your ios/Runner folder.


Initialize firebase


void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
copied to clipboard
Installation #

Pub get

firebase_backup_restore: ^0.0.1
copied to clipboard

Import

import 'package:firebase_backup_restore/results.dart';
import 'package:firebase_backup_restore/firebase_backup_restore.dart';
copied to clipboard

Initialize firestore collection list

FirebaseBackupRestore().collections = ['posts', 'users',];
copied to clipboard
Using #

Backup All

await FirebaseBackupRestore().backupAll();
copied to clipboard

Restore All

await FirebaseBackupRestore().restoreAll();
copied to clipboard

Backup specific document

await FirebaseBackupRestore().backup(collectionId: "users");
copied to clipboard

Restore specific document

await FirebaseBackupRestore().restore(collectionId: "users");
copied to clipboard
Authors #

ShehanRashmika

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.