Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ abstract class DocumentChange<T extends Object?> {

class _JsonDocumentChange implements DocumentChange<Map<String, dynamic>> {
_JsonDocumentChange(this._firestore, this._delegate) {
DocumentChangePlatform.verifyExtends(_delegate);
DocumentChangePlatform.verify(_delegate);
}

final DocumentChangePlatform _delegate;
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ abstract class DocumentReference<T extends Object?> {
class _JsonDocumentReference
implements DocumentReference<Map<String, dynamic>> {
_JsonDocumentReference(this.firestore, this._delegate) {
DocumentReferencePlatform.verifyExtends(_delegate);
DocumentReferencePlatform.verify(_delegate);
}

@override
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ abstract class DocumentSnapshot<T extends Object?> {

class _JsonDocumentSnapshot implements DocumentSnapshot<Map<String, dynamic>> {
_JsonDocumentSnapshot(this._firestore, this._delegate) {
DocumentSnapshotPlatform.verifyExtends(_delegate);
DocumentSnapshotPlatform.verify(_delegate);
}

final FirebaseFirestore _firestore;
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ part of cloud_firestore;

class LoadBundleTask {
LoadBundleTask._(this._delegate) {
LoadBundleTaskPlatform.verifyExtends(_delegate);
LoadBundleTaskPlatform.verify(_delegate);
}

final LoadBundleTaskPlatform _delegate;
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ part of cloud_firestore;
/// A [LoadBundleTaskSnapshot] is returned as the result or on-going process of a [LoadBundleTask].
class LoadBundleTaskSnapshot {
LoadBundleTaskSnapshot._(this._delegate) {
LoadBundleTaskSnapshotPlatform.verifyExtends(_delegate);
LoadBundleTaskSnapshotPlatform.verify(_delegate);
}
LoadBundleTaskSnapshotPlatform _delegate;

Original file line number Diff line number Diff line change
@@ -198,7 +198,7 @@ class _JsonQuery implements Query<Map<String, dynamic>> {
this.firestore,
this._delegate,
) {
QueryPlatform.verifyExtends(_delegate);
QueryPlatform.verify(_delegate);
}

@override
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ abstract class QuerySnapshot<T extends Object?> {
/// It can contain zero or more [DocumentSnapshot] objects.
class _JsonQuerySnapshot implements QuerySnapshot<Map<String, dynamic>> {
_JsonQuerySnapshot(this._firestore, this._delegate) {
QuerySnapshotPlatform.verifyExtends(_delegate);
QuerySnapshotPlatform.verify(_delegate);
}

final FirebaseFirestore _firestore;
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ class Transaction {
final TransactionPlatform _delegate;

Transaction._(this._firestore, this._delegate) {
TransactionPlatform.verifyExtends(_delegate);
TransactionPlatform.verify(_delegate);
}

/// Reads the document referenced by the provided [DocumentReference].
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ part of cloud_firestore;
/// nor can it be committed again.
class WriteBatch {
WriteBatch._(this._firestore, this._delegate) {
WriteBatchPlatform.verifyExtends(_delegate);
WriteBatchPlatform.verify(_delegate);
}

final FirebaseFirestore _firestore;
Original file line number Diff line number Diff line change
@@ -3,9 +3,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

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

/// The type of change that occurred (added, modified, or removed).
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@ abstract class DocumentReferencePlatform extends PlatformInterface {
/// This is used by the app-facing [DocumentReference] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(DocumentReferencePlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(DocumentReferencePlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// The Firestore instance associated with this document reference
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ class DocumentSnapshotPlatform extends PlatformInterface {
/// This is used by the app-facing [DocumentSnapshot] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(DocumentSnapshotPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(DocumentSnapshotPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// The [FirebaseFirestorePlatform] used to produce this [DocumentSnapshotPlatform].
Original file line number Diff line number Diff line change
@@ -3,10 +3,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'package:cloud_firestore_platform_interface/src/method_channel/method_channel_field_value_factory.dart';
import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
import 'package:cloud_firestore_platform_interface/src/method_channel/method_channel_field_value_factory.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

/// An interface for a factory that is used to build a [FieldValuePlatform] according to
/// Platform (web or mobile)
@@ -24,7 +23,7 @@ abstract class FieldValueFactoryPlatform extends PlatformInterface {
/// Sets the default instance of [FieldValueFactoryPlatform] which is used to build
/// [FieldValuePlatform] items
static set instance(FieldValueFactoryPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
PlatformInterface.verify(instance, _token);
_instance = instance;
}

@@ -36,8 +35,8 @@ abstract class FieldValueFactoryPlatform extends PlatformInterface {
/// This is used by the app-facing [FieldValueFactory] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(FieldValueFactoryPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(FieldValueFactoryPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// Returns a special value that tells the server to union the given elements
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ abstract class FirebaseFirestorePlatform extends PlatformInterface {

/// Sets the [FirebaseFirestorePlatform.instance]
static set instance(FirebaseFirestorePlatform instance) {
PlatformInterface.verifyToken(instance, _token);
PlatformInterface.verify(instance, _token);
_instance = instance;
}

Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ abstract class LoadBundleTaskPlatform<T> extends PlatformInterface {
/// This is used by the app-facing [LoadBundleTask] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(LoadBundleTaskPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(LoadBundleTaskPlatform instance) {
PlatformInterface.verify(instance, _token);
}

Stream<T> get stream;
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
// found in the LICENSE file.

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import '../../cloud_firestore_platform_interface.dart';

/// The interface a load bundle task snapshot must extend.
@@ -24,8 +25,8 @@ class LoadBundleTaskSnapshotPlatform extends PlatformInterface {
/// This is used by the app-facing [LoadBundleTaskSnapshot] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(LoadBundleTaskSnapshotPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(LoadBundleTaskSnapshotPlatform instance) {
PlatformInterface.verify(instance, _token);
}

final LoadBundleTaskState taskState;
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@

import 'dart:async';

import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
import 'package:meta/meta.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';

Map<String, dynamic> _initialParameters = Map<String, dynamic>.unmodifiable({
'where': List<List<dynamic>>.unmodifiable([]),
@@ -36,10 +36,8 @@ abstract class QueryPlatform extends PlatformInterface {
/// This is used by the app-facing [Query] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(QueryPlatform instance) {
if (instance is! CollectionReferencePlatform) {
PlatformInterface.verifyToken(instance, _token);
}
static void verify(QueryPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// The [FirebaseFirestorePlatform] interface for this current query.
Original file line number Diff line number Diff line change
@@ -3,9 +3,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

/// A interface that contains zero or more [DocumentSnapshotPlatform] objects
/// representing the results of a query.
@@ -28,8 +27,8 @@ class QuerySnapshotPlatform extends PlatformInterface {
/// This is used by the app-facing [QuerySnapshot] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(QuerySnapshotPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(QuerySnapshotPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// Gets a list of all the documents included in this [QuerySnapshotPlatform]
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ abstract class TransactionPlatform extends PlatformInterface {
/// This is used by the app-facing [Transaction] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(TransactionPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(TransactionPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// Returns all transaction commands for the current instance.
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ abstract class WriteBatchPlatform extends PlatformInterface {
/// This is used by the app-facing [WriteBatch] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(WriteBatchPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(WriteBatchPlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// Commits all of the writes in this write batch as a single atomic unit.
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.1.3


dev_dependencies:
Original file line number Diff line number Diff line change
@@ -44,9 +44,9 @@ void main() {
expect(query, isInstanceOf<QueryPlatform>());
});

test('verifyExtends()', () {
test('verify()', () {
final query = TestQuery._();
QueryPlatform.verifyExtends(query);
QueryPlatform.verify(query);
expect(query, isInstanceOf<QueryPlatform>());
});

Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ void main() {
expect(transaction, isInstanceOf<TransactionPlatform>());
});

test('verifyExtends()', () {
test('verify()', () {
final transaction = TestTransaction._();
TransactionPlatform.verifyExtends(transaction);
TransactionPlatform.verify(transaction);
expect(transaction, isInstanceOf<TransactionPlatform>());
});

Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ void main() {
expect(batch, isInstanceOf<WriteBatchPlatform>());
});

test('verifyExtends()', () {
test('verify()', () {
final batch = TestWriteBatch._();
WriteBatchPlatform.verifyExtends(batch);
WriteBatchPlatform.verify(batch);
expect(batch, isInstanceOf<WriteBatchPlatform>());
});

2 changes: 1 addition & 1 deletion packages/cloud_functions/cloud_functions/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ dev_dependencies:
sdk: flutter
flutter_test:
sdk: flutter
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.1.3
test: any

flutter:
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ abstract class FirebaseFunctionsPlatform extends PlatformInterface {

/// Sets the [FirebaseFunctionsPlatform.instance]
static set instance(FirebaseFunctionsPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
PlatformInterface.verify(instance, _token);
_instance = instance;
}

Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
import 'dart:async';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import '../../cloud_functions_platform_interface.dart';

/// Interface for [HttpsCallable] implementations.
@@ -24,8 +25,8 @@ abstract class HttpsCallablePlatform extends PlatformInterface {
/// This is used by the app-facing [HttpsCallable] to ensure that
/// the object in which it's going to delegate calls has been
/// constructed properly.
static void verifyExtends(HttpsCallablePlatform instance) {
PlatformInterface.verifyToken(instance, _token);
static void verify(HttpsCallablePlatform instance) {
PlatformInterface.verify(instance, _token);
}

/// The [FirebaseFunctionsPlatform] instance.
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.1.3

dev_dependencies:
firebase_core_platform_interface: ^4.5.1
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'dart:async';

import 'package:firebase_core/firebase_core.dart';
import 'package:meta/meta.dart' show protected;
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
@@ -53,7 +54,7 @@ abstract class FirebaseAnalyticsPlatform extends PlatformInterface {

/// Sets the [FirebaseAnalyticsPlatform.instance]
static set instance(FirebaseAnalyticsPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
PlatformInterface.verify(instance, _token);
_instance = instance;
}

Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ dependencies:
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.1.3

dev_dependencies:
firebase_core_platform_interface: ^4.5.1
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^5.0.0
plugin_platform_interface: ^2.0.0
plugin_platform_interface: ^2.1.3
test: any

flutter:
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ abstract class FirebaseAppCheckPlatform extends PlatformInterface {

/// Sets the [FirebaseAppCheckPlatform.instance]
static set instance(FirebaseAppCheckPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
PlatformInterface.verify(instance, _token);
_instance = instance;
}

Loading