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

example/lib/main.dart

import 'package:document_family/document_family.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Plugin example app'),
          ),
          body: Center(
            child: ElevatedButton(
              onPressed: () async {
                final DocumentFamily plugin = DocumentFamily.withPath(
                  '/collection-a/sampledoc',
                  [
                    {'collection': 'sub-collection-a'},
                    {'collection': 'sub-collection-b'},
                    {
                      'collection': 'sub-collection-c',
                      'children': [
                        {'collection': 'child-collection-a'},
                        {'collection': 'child-collection-b'},
                      ],
                    },
                  ],
                );
                await plugin.delete();
              },
              child: const Text('Delete Document Family'),
            ),
          )),
    );
  }
}
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