Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/dart_firebase_admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ print(user.data()?['age']);
| query.limitToLast | ✅ |
| query.offset | ✅ |
| query.count() | ✅ |
| query.sum() | |
| query.average() | |
| query.sum() | |
| query.average() | |
| querySnapshot.docs | ✅ |
| querySnapshot.readTime | ✅ |
| documentSnapshots.data | ✅ |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class DocumentSnapshot<T> {
/// }
/// });
/// ```
bool get exists => this._fieldsProto != null;
bool get exists => _fieldsProto != null;

/// Retrieves all fields in the document as an object. Returns 'undefined' if
/// the document doesn't exist.
Expand All @@ -196,7 +196,7 @@ class DocumentSnapshot<T> {
/// });
/// ```
T? data() {
final fieldsProto = this._fieldsProto;
final fieldsProto = _fieldsProto;
final fields = fieldsProto?.fields;
if (fields == null || fieldsProto == null) return null;

Expand Down Expand Up @@ -245,7 +245,7 @@ class DocumentSnapshot<T> {
}

firestore1.Value? _protoField(FieldPath field) {
final fieldsProto = this._fieldsProto?.fields;
final fieldsProto = _fieldsProto?.fields;
if (fieldsProto == null) return null;
var fields = fieldsProto;

Expand Down Expand Up @@ -300,11 +300,11 @@ class _DocumentSnapshotBuilder<T> {

DocumentSnapshot<T> build() {
assert(
(this.fieldsProto != null) == (this.createTime != null),
(this.fieldsProto != null) == (createTime != null),
'Create time should be set iff document exists.',
);
assert(
(this.fieldsProto != null) == (this.updateTime != null),
(this.fieldsProto != null) == (updateTime != null),
'Update time should be set iff document exists.',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class _DocumentReader<T> {
DocumentSnapshot<DocumentData>? documentSnapshot;

if (response.transaction?.isNotEmpty ?? false) {
this._retrievedTransactionId = response.transaction;
_retrievedTransactionId = response.transaction;
}

final found = response.found;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ abstract class _Path<T extends _Path<Object?>> implements Comparable<_Path<T>> {

/// Checks whether the current path is a prefix of the specified path.
bool _isPrefixOf(_Path<T> other) {
if (other.segments.length < this.segments.length) {
if (other.segments.length < segments.length) {
return false;
}

for (var i = 0; i < this.segments.length; i++) {
if (this.segments[i] != other.segments[i]) {
for (var i = 0; i < segments.length; i++) {
if (segments[i] != other.segments[i]) {
return false;
}
}
Expand All @@ -74,8 +74,8 @@ abstract class _Path<T extends _Path<Object?>> implements Comparable<_Path<T>> {
if (compare != 0) return compare;
}

if (this.segments.length < other.segments.length) return -1;
if (this.segments.length > other.segments.length) return 1;
if (segments.length < other.segments.length) return -1;
if (segments.length > other.segments.length) return 1;

return 0;
}
Expand Down
Loading
Loading