lc_firestore_batch 0.1.0-beta.0 copy "lc_firestore_batch: ^0.1.0-beta.0" to clipboard
lc_firestore_batch: ^0.1.0-beta.0 copied to clipboard

unlistedoutdated

A util for firebase batch op

What's for this #

This is a util for firebase batch write.

How to use #

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:lc_firestore_batch/lc_firestore_batch.dart';

void main() async {
  final batch = LcFirestoreBatch();

  batch.create(
    collectionPath: 'test',
    currentChanges: {'date': FieldValue.serverTimestamp()},
    docId: '1',
  );
  batch.update(
    collectionPath: 'test',
    docId: '1',
    currentChanges: {'name': 'test'},
  );
  batch.delete(collectionPath: 'test', docId: '1');

  await batch.commit();
}

0
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A util for firebase batch op

Homepage

License

unknown (license)

Dependencies

cloud_firestore, firebase_auth, firebase_core, flutter, lc_utils

More

Packages that depend on lc_firestore_batch