document_family 0.0.2 copy "document_family: ^0.0.2" to clipboard
document_family: ^0.0.2 copied to clipboard

delete Document include all sub collections

document_family #

This package deletes a firestore document and all its sub-collections.

Warnings #

  1. To delete a collection, all documents within that collection must be deleted first.
  2. If the current document is deleted before its sub-collections, you will no longer be able to access these sub-collections.
  3. Before attempting, you must stop all write operations to the document and collections.
  4. Be careful of the deletion order to avoid permission issues. (Key data related to permissions should be deleted last.)

Getting Started #

final DocumentReference docRef = FirebaseFirestore.instance
    .collection('some-collection')
    .doc('example123');
final children = [
  {'collection': 'members'},
  {'collection': 'requestingMembers'},
  {
    'collection': 'tracking',
    'children': [
      {'collection': 'history'},
    ],
  },
];

await DocumentFamily(docRef, children).delete();
2
likes
140
points
48
downloads

Publisher

unverified uploader

Weekly Downloads

delete Document include all sub collections

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cloud_firestore, flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on document_family