Skip to content

Commit c99a842

Browse files
authored
refactor(plugin_platform_interface): add verify to QueryPlatform and change internal verifyToken API to verify (#9711)
* fix: change verifyToken to verify * fix: remove condition for verify * fix: fix verify * fix: fix verify * fix: bump plugin_platform_inteface version
1 parent 9ad97c8 commit c99a842

File tree

105 files changed

+171
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+171
-158
lines changed

packages/cloud_firestore/cloud_firestore/lib/src/document_change.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class DocumentChange<T extends Object?> {
3232

3333
class _JsonDocumentChange implements DocumentChange<Map<String, dynamic>> {
3434
_JsonDocumentChange(this._firestore, this._delegate) {
35-
DocumentChangePlatform.verifyExtends(_delegate);
35+
DocumentChangePlatform.verify(_delegate);
3636
}
3737

3838
final DocumentChangePlatform _delegate;

packages/cloud_firestore/cloud_firestore/lib/src/document_reference.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ abstract class DocumentReference<T extends Object?> {
9494
class _JsonDocumentReference
9595
implements DocumentReference<Map<String, dynamic>> {
9696
_JsonDocumentReference(this.firestore, this._delegate) {
97-
DocumentReferencePlatform.verifyExtends(_delegate);
97+
DocumentReferencePlatform.verify(_delegate);
9898
}
9999

100100
@override

packages/cloud_firestore/cloud_firestore/lib/src/document_snapshot.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ abstract class DocumentSnapshot<T extends Object?> {
5959

6060
class _JsonDocumentSnapshot implements DocumentSnapshot<Map<String, dynamic>> {
6161
_JsonDocumentSnapshot(this._firestore, this._delegate) {
62-
DocumentSnapshotPlatform.verifyExtends(_delegate);
62+
DocumentSnapshotPlatform.verify(_delegate);
6363
}
6464

6565
final FirebaseFirestore _firestore;

packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ part of cloud_firestore;
66

77
class LoadBundleTask {
88
LoadBundleTask._(this._delegate) {
9-
LoadBundleTaskPlatform.verifyExtends(_delegate);
9+
LoadBundleTaskPlatform.verify(_delegate);
1010
}
1111

1212
final LoadBundleTaskPlatform _delegate;

packages/cloud_firestore/cloud_firestore/lib/src/load_bundle_task_snapshot.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ part of cloud_firestore;
77
/// A [LoadBundleTaskSnapshot] is returned as the result or on-going process of a [LoadBundleTask].
88
class LoadBundleTaskSnapshot {
99
LoadBundleTaskSnapshot._(this._delegate) {
10-
LoadBundleTaskSnapshotPlatform.verifyExtends(_delegate);
10+
LoadBundleTaskSnapshotPlatform.verify(_delegate);
1111
}
1212
LoadBundleTaskSnapshotPlatform _delegate;
1313

packages/cloud_firestore/cloud_firestore/lib/src/query.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class _JsonQuery implements Query<Map<String, dynamic>> {
198198
this.firestore,
199199
this._delegate,
200200
) {
201-
QueryPlatform.verifyExtends(_delegate);
201+
QueryPlatform.verify(_delegate);
202202
}
203203

204204
@override

packages/cloud_firestore/cloud_firestore/lib/src/query_snapshot.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ abstract class QuerySnapshot<T extends Object?> {
2525
/// It can contain zero or more [DocumentSnapshot] objects.
2626
class _JsonQuerySnapshot implements QuerySnapshot<Map<String, dynamic>> {
2727
_JsonQuerySnapshot(this._firestore, this._delegate) {
28-
QuerySnapshotPlatform.verifyExtends(_delegate);
28+
QuerySnapshotPlatform.verify(_delegate);
2929
}
3030

3131
final FirebaseFirestore _firestore;

packages/cloud_firestore/cloud_firestore/lib/src/transaction.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Transaction {
1414
final TransactionPlatform _delegate;
1515

1616
Transaction._(this._firestore, this._delegate) {
17-
TransactionPlatform.verifyExtends(_delegate);
17+
TransactionPlatform.verify(_delegate);
1818
}
1919

2020
/// Reads the document referenced by the provided [DocumentReference].

packages/cloud_firestore/cloud_firestore/lib/src/write_batch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ part of cloud_firestore;
1212
/// nor can it be committed again.
1313
class WriteBatch {
1414
WriteBatch._(this._firestore, this._delegate) {
15-
WriteBatchPlatform.verifyExtends(_delegate);
15+
WriteBatchPlatform.verify(_delegate);
1616
}
1717

1818
final FirebaseFirestore _firestore;

packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/platform_interface/platform_interface_document_change.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
// for details. All rights reserved. Use of this source code is governed by a
44
// BSD-style license that can be found in the LICENSE file.
55

6-
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
7-
86
import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
7+
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
98

109
/// An enumeration of document change types.
1110
enum DocumentChangeType {
@@ -42,8 +41,8 @@ class DocumentChangePlatform extends PlatformInterface {
4241
/// This is used by the app-facing [DocumentChange] to ensure that
4342
/// the object in which it's going to delegate calls has been
4443
/// constructed properly.
45-
static void verifyExtends(DocumentChangePlatform instance) {
46-
PlatformInterface.verifyToken(instance, _token);
44+
static void verify(DocumentChangePlatform instance) {
45+
PlatformInterface.verify(instance, _token);
4746
}
4847

4948
/// The type of change that occurred (added, modified, or removed).

0 commit comments

Comments
 (0)