Skip to content
Open
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
30 changes: 30 additions & 0 deletions packages/firebase_data_connect/firebase_data_connect/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2
base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2
- platform: macos
create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2
base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:flutter_lints/flutter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Cache {

String _constructCacheIdentifier() {
final rawPrefix =
'${_settings.storage}-${dataConnect.app.options.projectId}-${dataConnect.app.name}-${dataConnect.connectorConfig.serviceId}-${dataConnect.connectorConfig.connector}-${dataConnect.connectorConfig.location}-${dataConnect.transport.transportOptions.host}';
'${_settings.storage}-${dataConnect.app.options.projectId}-${dataConnect.app.name}-${dataConnect.connectorConfig.serviceId}-${dataConnect.connectorConfig.connector}-${dataConnect.connectorConfig.location}-${dataConnect.transport?.transportOptions.host}';
final prefixSha = convertToSha256(rawPrefix);
final rawSuffix = dataConnect.auth?.currentUser?.uid ?? 'anon';
final suffixSha = convertToSha256(rawSuffix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ class EntityNode {
srcListMap.forEach((key, value) {
List<EntityNode> enodeList = [];
List<dynamic> jsonList = value as List<dynamic>;
jsonList.forEach((jsonObj) {
for (var jsonObj in jsonList) {
Map<String, dynamic> jmap = jsonObj as Map<String, dynamic>;
EntityNode en = EntityNode.fromJson(jmap, cacheProvider);
enodeList.add(en);
});
}
objLists?[key] = enodeList;
});
}
Expand Down Expand Up @@ -367,9 +367,9 @@ class EntityNode {
if (nestedObjectLists != null) {
nestedObjectLists!.forEach((key, edoList) {
List<Map<String, dynamic>> jsonList = [];
edoList.forEach((edo) {
for (var edo in edoList) {
jsonList.add(edo.toJson(mode: mode));
});
}
jsonData[key] = jsonList;
});
}
Expand All @@ -396,9 +396,9 @@ class EntityNode {
Map<String, dynamic> nestedObjectListsJson = {};
nestedObjectLists!.forEach((key, edoList) {
List<Map<String, dynamic>> jsonList = [];
edoList.forEach((edo) {
for (var edo in edoList) {
jsonList.add(edo.toJson(mode: mode));
});
}
nestedObjectListsJson[key] = jsonList;
});
jsonData[listsKey] = nestedObjectListsJson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ abstract class DataConnectTransport {

/// Invokes corresponding query endpoint.
Future<ServerResponse> invokeQuery<Data, Variables>(
String operationId,
String queryName,
Deserializer<Data> deserializer,
Serializer<Variables> serializer,
Expand All @@ -111,6 +112,17 @@ abstract class DataConnectTransport {

/// Invokes corresponding mutation endpoint.
Future<ServerResponse> invokeMutation<Data, Variables>(
String operationId,
String queryName,
Deserializer<Data> deserializer,
Serializer<Variables> serializer,
Variables? vars,
String? token,
);

/// Invokes corresponding stream query endpoint.
Stream<ServerResponse> invokeStreamQuery<Data, Variables>(
String operationId,
String queryName,
Deserializer<Data> deserializer,
Serializer<Variables> serializer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ class DataConnectError extends FirebaseException {

/// Error thrown when an operation is partially successful.
class DataConnectOperationError<T> extends DataConnectError {
DataConnectOperationError(
DataConnectErrorCode code, String message, this.response)
: super(code, message);
DataConnectOperationError(super.code, super.message, this.response);
final DataConnectOperationFailureResponse<T> response;
}

Expand Down
Loading
Loading