Skip to content

Upgrading cloud_firestore 0.16 to 1

Breaking0.16.0+1 โ†’ 1.0.7Breaking1Platform1Changed2Fixed5Other4

BreakingUpgrade verdict

1 breaking change and a platform requirement change.

  • The package now uses Dart's null safety, which can require code changes for existing users.
  • Projects must use Dart 2.12.0 or newer to use this version.
2 items need code or config changes

Dart SDK requirement changed in 1.0.3: >=2.1.0 <3.0.0 โ†’ >=2.12.0 <3.0.0.

Flutter requirement changed in 0.17.0-1.0.nullsafety.0: >=1.12.13+hotfix.4 <2.0.0 โ†’ >=1.12.13+hotfix.4.

Breaking1
Migrates the package to non-nullable by default (NNBD), a breaking change.
Platform1
Bumps the minimum Dart SDK constraint to 2.12.0.

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • removed: typedef Future<T> TransactionHandler<T>(Transaction transaction)
  • changed: get CollectionReference.parent: DocumentReference โ†’ get CollectionReference.parent: DocumentReference?
  • changed: method CollectionReference.doc([String path]): DocumentReference โ†’ method CollectionReference.doc([String? path]): DocumentReference
  • changed: method CollectionReference.operator ==(dynamic o): bool โ†’ method CollectionReference.operator ==(Object other): bool
  • changed: method DocumentReference.get([GetOptions options]): Future<DocumentSnapshot> โ†’ method DocumentReference.get([GetOptions? options]): Future<DocumentSnapshot>
  • changed: method DocumentReference.operator ==(dynamic o): bool โ†’ method DocumentReference.operator ==(Object other): bool
  • changed: method DocumentReference.set(Map<String, dynamic> data, [SetOptions options]): Future<void> โ†’ method DocumentReference.set(Map<String, dynamic> data, [SetOptions? options]): Future<void>
  • changed: method DocumentSnapshot.data(): Map<String, dynamic> โ†’ method DocumentSnapshot.data(): Map<String, dynamic>?
  • changed: method FieldValue.operator ==(Object o): bool โ†’ method FieldValue.operator ==(Object other): bool
  • changed: method FirebaseFirestore.enablePersistence( [PersistenceSettings persistenceSettings]): Future<void> โ†’ method FirebaseFirestore.enablePersistence( [PersistenceSettings? persistenceSettings]): Future<void>
  • changed: method FirebaseFirestore.operator ==(dynamic o): bool โ†’ method FirebaseFirestore.operator ==(Object other): bool
  • changed: method FirebaseFirestore.runTransaction<T>(TransactionHandler<T> transactionHandler, {Duration timeout = โ€ฆ}): Future<T > โ†’ method FirebaseFirestore.runTransaction<T>(TransactionHandler<T> transactionHandler, {Duration timeout = โ€ฆ}): Future<T>
  • changed: method Query.get([GetOptions options]): Future<QuerySnapshot> โ†’ method Query.get([GetOptions? options]): Future<QuerySnapshot>
  • changed: method Query.where( dynamic field, { dynamic isEqualTo, dynamic isNotEqualTo, dynamic isLessThan, dynamic isLessThanOrEqualTo, dynamic isGreaterThan, dynamic isGreaterThanOrEqualTo, dynamic arrayContains, List<dynamic> arrayContainsAny, List<dynamic> whereIn, List<dynamic> whereNotIn, bool isNull, }): Query โ†’ method Query.where( dynamic field, { dynamic isEqualTo, dynamic isNotEqualTo, dynamic isLessThan, dynamic isLessThanOrEqualTo, dynamic isGreaterThan, dynamic isGreaterThanOrEqualTo, dynamic arrayContains, List<dynamic>? arrayContainsAny, List<dynamic>? whereIn, List<dynamic>? whereNotIn, bool? isNull, }): Query
  • changed: method Transaction.set( DocumentReference documentReference, Map<String, dynamic> data, [SetOptions options]): Transaction โ†’ method Transaction.set( DocumentReference documentReference, Map<String, dynamic> data, [SetOptions? options]): Transaction
  • changed: method WriteBatch.set(DocumentReference document, Map<String, dynamic> data, [SetOptions options]): void โ†’ method WriteBatch.set(DocumentReference document, Map<String, dynamic> data, [SetOptions? options]): void
  • changed: static method FirebaseFirestore.instanceFor({FirebaseApp app}): FirebaseFirestore โ†’ static method FirebaseFirestore.instanceFor({required FirebaseApp app}): FirebaseFirestore
  • added: method QueryDocumentSnapshot.data(): Map<String, dynamic>
  • added: typedef TransactionHandler<T> = Future<T> Function(Transaction transaction)