@@ -297,10 +297,9 @@ class FirestoreSnippets extends DocSnippet {
297
297
}
298
298
299
299
void transactions_passingInformationOutOfTransactions () {
300
- // [START transactions_passing_information_out_of_transactions]
301
-
302
300
// TODO: ewindmill@ - either the above example (using asnyc) or this example
303
301
// using (then) is "more correct". Figure out which one.
302
+ // [START transactions_passing_information_out_of_transactions]
304
303
final sfDocRef = db.collection ("cities" ).doc ("SF" );
305
304
db.runTransaction ((transaction) {
306
305
return transaction.get (sfDocRef).then ((sfDoc) {
@@ -317,18 +316,6 @@ class FirestoreSnippets extends DocSnippet {
317
316
318
317
void transactions_batchedWrites () {
319
318
// [START transactions_batched_writes]
320
- /*
321
-
322
-
323
-
324
-
325
-
326
-
327
- // Commit the batch
328
- batch.commit().then(() => {
329
- // ...
330
- });
331
- */
332
319
// Get a new write batch
333
320
final batch = db.batch ();
334
321
@@ -453,9 +440,9 @@ batch.commit().then(() => {
453
440
}
454
441
455
442
void getDataOnce_customObjects () {
456
- // [START get_data_once_custom_objects]
457
443
// TODO: should this be included?
458
444
// This isn't really specific to Firestore, it's just serdes
445
+ // [START get_data_once_custom_objects]
459
446
final docRef = db.collection ("cities" ).doc ("BJ" );
460
447
docRef.get ().then ((documentSnapshot) {
461
448
final data = documentSnapshot.data () as Map <String , dynamic >;
@@ -586,9 +573,6 @@ batch.commit().then(() => {
586
573
587
574
void performSimpleAndCompoundQueries_exampleData () {
588
575
// [START perform_simple_and_compound_queries_example_data]
589
- /*
590
-
591
- */
592
576
final cities = db.collection ("cities" );
593
577
final data1 = < String , dynamic > {
594
578
"name" : "San Francisco" ,
@@ -670,9 +654,6 @@ batch.commit().then(() => {
670
654
671
655
void performSimpleAndCompoundQueries_queryOperators () {
672
656
// [START perform_simple_and_compound_queries_query_operators]
673
- /*
674
-
675
- */
676
657
final citiesRef = db.collection ("cities" );
677
658
final stateQuery = citiesRef.where ("state" , isEqualTo: "CA" );
678
659
final populationQuery = citiesRef.where ("population" , isLessThan: 100000 );
0 commit comments