Skip to content

Commit 23eec8d

Browse files
committed
Fixed message
1 parent b86eb24 commit 23eec8d

17 files changed

+306
-461
lines changed

Diff for: packages/firebase_data_connect/firebase_data_connect/example/lib/generated/add_date_and_timestamp.dart

+14-28
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,23 @@ class AddDateAndTimestampVariablesBuilder {
55
Timestamp timestamp;
66

77
final FirebaseDataConnect _dataConnect;
8-
AddDateAndTimestampVariablesBuilder(
9-
this._dataConnect, {
10-
required this.date,
11-
required this.timestamp,
12-
});
13-
Deserializer<AddDateAndTimestampData> dataDeserializer =
14-
(dynamic json) => AddDateAndTimestampData.fromJson(jsonDecode(json));
15-
Serializer<AddDateAndTimestampVariables> varsSerializer =
16-
(AddDateAndTimestampVariables vars) => jsonEncode(vars.toJson());
17-
Future<OperationResult<AddDateAndTimestampData, AddDateAndTimestampVariables>>
18-
execute() {
8+
AddDateAndTimestampVariablesBuilder(this._dataConnect, {required this.date,required this.timestamp,});
9+
Deserializer<AddDateAndTimestampData> dataDeserializer = (dynamic json) => AddDateAndTimestampData.fromJson(jsonDecode(json));
10+
Serializer<AddDateAndTimestampVariables> varsSerializer = (AddDateAndTimestampVariables vars) => jsonEncode(vars.toJson());
11+
Future<OperationResult<AddDateAndTimestampData, AddDateAndTimestampVariables>> execute() {
1912
return ref().execute();
2013
}
2114

2215
MutationRef<AddDateAndTimestampData, AddDateAndTimestampVariables> ref() {
23-
AddDateAndTimestampVariables vars = AddDateAndTimestampVariables(
24-
date: date,
25-
timestamp: timestamp,
26-
);
27-
return _dataConnect.mutation(
28-
"addDateAndTimestamp", dataDeserializer, varsSerializer, vars);
16+
AddDateAndTimestampVariables vars= AddDateAndTimestampVariables(date: date,timestamp: timestamp,);
17+
return _dataConnect.mutation("addDateAndTimestamp", dataDeserializer, varsSerializer, vars);
2918
}
3019
}
3120

3221
class AddDateAndTimestampTimestampHolderInsert {
3322
String id;
34-
AddDateAndTimestampTimestampHolderInsert.fromJson(dynamic json)
35-
: id = nativeFromJson<String>(json['id']);
23+
AddDateAndTimestampTimestampHolderInsert.fromJson(dynamic json):
24+
id = nativeFromJson<String>(json['id']);
3625

3726
Map<String, dynamic> toJson() {
3827
Map<String, dynamic> json = {};
@@ -47,10 +36,8 @@ class AddDateAndTimestampTimestampHolderInsert {
4736

4837
class AddDateAndTimestampData {
4938
AddDateAndTimestampTimestampHolderInsert timestampHolder_insert;
50-
AddDateAndTimestampData.fromJson(dynamic json)
51-
: timestampHolder_insert =
52-
AddDateAndTimestampTimestampHolderInsert.fromJson(
53-
json['timestampHolder_insert']);
39+
AddDateAndTimestampData.fromJson(dynamic json):
40+
timestampHolder_insert = AddDateAndTimestampTimestampHolderInsert.fromJson(json['timestampHolder_insert']);
5441

5542
Map<String, dynamic> toJson() {
5643
Map<String, dynamic> json = {};
@@ -66,11 +53,9 @@ class AddDateAndTimestampData {
6653
class AddDateAndTimestampVariables {
6754
DateTime date;
6855
Timestamp timestamp;
69-
@Deprecated(
70-
'fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
71-
AddDateAndTimestampVariables.fromJson(Map<String, dynamic> json)
72-
: date = nativeFromJson<DateTime>(json['date']),
73-
timestamp = Timestamp.fromJson(json['timestamp']);
56+
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
57+
AddDateAndTimestampVariables.fromJson(Map<String, dynamic> json):
58+
date = nativeFromJson<DateTime>(json['date']),timestamp = Timestamp.fromJson(json['timestamp']);
7459

7560
Map<String, dynamic> toJson() {
7661
Map<String, dynamic> json = {};
@@ -84,3 +69,4 @@ class AddDateAndTimestampVariables {
8469
required this.timestamp,
8570
});
8671
}
72+
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,37 @@
11
part of 'movies.dart';
22

33
class AddDirectorToMovieVariablesBuilder {
4-
Optional<AddDirectorToMovieVariablesPersonId> _personId = Optional.optional(
5-
AddDirectorToMovieVariablesPersonId.fromJson, defaultSerializer);
4+
Optional<AddDirectorToMovieVariablesPersonId> _personId = Optional.optional(AddDirectorToMovieVariablesPersonId.fromJson, defaultSerializer);
65
Optional<String> _movieId = Optional.optional(nativeFromJson, nativeToJson);
76

87
final FirebaseDataConnect _dataConnect;
9-
AddDirectorToMovieVariablesBuilder personId(
10-
AddDirectorToMovieVariablesPersonId? t) {
11-
_personId.value = t;
12-
return this;
8+
AddDirectorToMovieVariablesBuilder personId(AddDirectorToMovieVariablesPersonId? t) {
9+
_personId.value = t;
10+
return this;
1311
}
14-
1512
AddDirectorToMovieVariablesBuilder movieId(String? t) {
16-
_movieId.value = t;
17-
return this;
13+
_movieId.value = t;
14+
return this;
1815
}
1916

20-
AddDirectorToMovieVariablesBuilder(
21-
this._dataConnect,
22-
);
23-
Deserializer<AddDirectorToMovieData> dataDeserializer =
24-
(dynamic json) => AddDirectorToMovieData.fromJson(jsonDecode(json));
25-
Serializer<AddDirectorToMovieVariables> varsSerializer =
26-
(AddDirectorToMovieVariables vars) => jsonEncode(vars.toJson());
27-
Future<OperationResult<AddDirectorToMovieData, AddDirectorToMovieVariables>>
28-
execute() {
17+
AddDirectorToMovieVariablesBuilder(this._dataConnect, );
18+
Deserializer<AddDirectorToMovieData> dataDeserializer = (dynamic json) => AddDirectorToMovieData.fromJson(jsonDecode(json));
19+
Serializer<AddDirectorToMovieVariables> varsSerializer = (AddDirectorToMovieVariables vars) => jsonEncode(vars.toJson());
20+
Future<OperationResult<AddDirectorToMovieData, AddDirectorToMovieVariables>> execute() {
2921
return ref().execute();
3022
}
3123

3224
MutationRef<AddDirectorToMovieData, AddDirectorToMovieVariables> ref() {
33-
AddDirectorToMovieVariables vars = AddDirectorToMovieVariables(
34-
personId: _personId,
35-
movieId: _movieId,
36-
);
37-
return _dataConnect.mutation(
38-
"addDirectorToMovie", dataDeserializer, varsSerializer, vars);
25+
AddDirectorToMovieVariables vars= AddDirectorToMovieVariables(personId: _personId,movieId: _movieId,);
26+
return _dataConnect.mutation("addDirectorToMovie", dataDeserializer, varsSerializer, vars);
3927
}
4028
}
4129

4230
class AddDirectorToMovieDirectedByInsert {
4331
String directedbyId;
4432
String movieId;
45-
AddDirectorToMovieDirectedByInsert.fromJson(dynamic json)
46-
: directedbyId = nativeFromJson<String>(json['directedbyId']),
47-
movieId = nativeFromJson<String>(json['movieId']);
33+
AddDirectorToMovieDirectedByInsert.fromJson(dynamic json):
34+
directedbyId = nativeFromJson<String>(json['directedbyId']),movieId = nativeFromJson<String>(json['movieId']);
4835

4936
Map<String, dynamic> toJson() {
5037
Map<String, dynamic> json = {};
@@ -61,9 +48,8 @@ class AddDirectorToMovieDirectedByInsert {
6148

6249
class AddDirectorToMovieData {
6350
AddDirectorToMovieDirectedByInsert directedBy_insert;
64-
AddDirectorToMovieData.fromJson(dynamic json)
65-
: directedBy_insert = AddDirectorToMovieDirectedByInsert.fromJson(
66-
json['directedBy_insert']);
51+
AddDirectorToMovieData.fromJson(dynamic json):
52+
directedBy_insert = AddDirectorToMovieDirectedByInsert.fromJson(json['directedBy_insert']);
6753

6854
Map<String, dynamic> toJson() {
6955
Map<String, dynamic> json = {};
@@ -78,8 +64,8 @@ class AddDirectorToMovieData {
7864

7965
class AddDirectorToMovieVariablesPersonId {
8066
String id;
81-
AddDirectorToMovieVariablesPersonId.fromJson(dynamic json)
82-
: id = nativeFromJson<String>(json['id']);
67+
AddDirectorToMovieVariablesPersonId.fromJson(dynamic json):
68+
id = nativeFromJson<String>(json['id']);
8369

8470
Map<String, dynamic> toJson() {
8571
Map<String, dynamic> json = {};
@@ -93,29 +79,25 @@ class AddDirectorToMovieVariablesPersonId {
9379
}
9480

9581
class AddDirectorToMovieVariables {
96-
late Optional<AddDirectorToMovieVariablesPersonId> personId;
97-
late Optional<String> movieId;
98-
@Deprecated(
99-
'fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
82+
late Optional<AddDirectorToMovieVariablesPersonId>personId;
83+
late Optional<String>movieId;
84+
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
10085
AddDirectorToMovieVariables.fromJson(Map<String, dynamic> json) {
101-
personId = Optional.optional(
102-
AddDirectorToMovieVariablesPersonId.fromJson, defaultSerializer);
103-
personId.value = json['personId'] == null
104-
? null
105-
: AddDirectorToMovieVariablesPersonId.fromJson(json['personId']);
106-
86+
87+
personId = Optional.optional(AddDirectorToMovieVariablesPersonId.fromJson, defaultSerializer);
88+
personId.value = json['personId'] == null ? null : AddDirectorToMovieVariablesPersonId.fromJson(json['personId']);
89+
10790
movieId = Optional.optional(nativeFromJson, nativeToJson);
108-
movieId.value = json['movieId'] == null
109-
? null
110-
: nativeFromJson<String>(json['movieId']);
91+
movieId.value = json['movieId'] == null ? null : nativeFromJson<String>(json['movieId']);
92+
11193
}
11294

11395
Map<String, dynamic> toJson() {
11496
Map<String, dynamic> json = {};
115-
if (personId.state == OptionalState.set) {
97+
if(personId.state == OptionalState.set) {
11698
json['personId'] = personId.toJson();
11799
}
118-
if (movieId.state == OptionalState.set) {
100+
if(movieId.state == OptionalState.set) {
119101
json['movieId'] = movieId.toJson();
120102
}
121103
return json;
@@ -126,3 +108,4 @@ class AddDirectorToMovieVariables {
126108
required this.movieId,
127109
});
128110
}
111+

Diff for: packages/firebase_data_connect/firebase_data_connect/example/lib/generated/add_person.dart

+18-24
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,27 @@ class AddPersonVariablesBuilder {
55

66
final FirebaseDataConnect _dataConnect;
77
AddPersonVariablesBuilder name(String? t) {
8-
_name.value = t;
9-
return this;
8+
_name.value = t;
9+
return this;
1010
}
1111

12-
AddPersonVariablesBuilder(
13-
this._dataConnect,
14-
);
15-
Deserializer<AddPersonData> dataDeserializer =
16-
(dynamic json) => AddPersonData.fromJson(jsonDecode(json));
17-
Serializer<AddPersonVariables> varsSerializer =
18-
(AddPersonVariables vars) => jsonEncode(vars.toJson());
12+
AddPersonVariablesBuilder(this._dataConnect, );
13+
Deserializer<AddPersonData> dataDeserializer = (dynamic json) => AddPersonData.fromJson(jsonDecode(json));
14+
Serializer<AddPersonVariables> varsSerializer = (AddPersonVariables vars) => jsonEncode(vars.toJson());
1915
Future<OperationResult<AddPersonData, AddPersonVariables>> execute() {
2016
return ref().execute();
2117
}
2218

2319
MutationRef<AddPersonData, AddPersonVariables> ref() {
24-
AddPersonVariables vars = AddPersonVariables(
25-
name: _name,
26-
);
27-
return _dataConnect.mutation(
28-
"addPerson", dataDeserializer, varsSerializer, vars);
20+
AddPersonVariables vars= AddPersonVariables(name: _name,);
21+
return _dataConnect.mutation("addPerson", dataDeserializer, varsSerializer, vars);
2922
}
3023
}
3124

3225
class AddPersonPersonInsert {
3326
String id;
34-
AddPersonPersonInsert.fromJson(dynamic json)
35-
: id = nativeFromJson<String>(json['id']);
27+
AddPersonPersonInsert.fromJson(dynamic json):
28+
id = nativeFromJson<String>(json['id']);
3629

3730
Map<String, dynamic> toJson() {
3831
Map<String, dynamic> json = {};
@@ -47,8 +40,8 @@ class AddPersonPersonInsert {
4740

4841
class AddPersonData {
4942
AddPersonPersonInsert person_insert;
50-
AddPersonData.fromJson(dynamic json)
51-
: person_insert = AddPersonPersonInsert.fromJson(json['person_insert']);
43+
AddPersonData.fromJson(dynamic json):
44+
person_insert = AddPersonPersonInsert.fromJson(json['person_insert']);
5245

5346
Map<String, dynamic> toJson() {
5447
Map<String, dynamic> json = {};
@@ -62,18 +55,18 @@ class AddPersonData {
6255
}
6356

6457
class AddPersonVariables {
65-
late Optional<String> name;
66-
@Deprecated(
67-
'fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
58+
late Optional<String>name;
59+
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
6860
AddPersonVariables.fromJson(Map<String, dynamic> json) {
61+
6962
name = Optional.optional(nativeFromJson, nativeToJson);
70-
name.value =
71-
json['name'] == null ? null : nativeFromJson<String>(json['name']);
63+
name.value = json['name'] == null ? null : nativeFromJson<String>(json['name']);
64+
7265
}
7366

7467
Map<String, dynamic> toJson() {
7568
Map<String, dynamic> json = {};
76-
if (name.state == OptionalState.set) {
69+
if(name.state == OptionalState.set) {
7770
json['name'] = name.toJson();
7871
}
7972
return json;
@@ -83,3 +76,4 @@ class AddPersonVariables {
8376
required this.name,
8477
});
8578
}
79+

Diff for: packages/firebase_data_connect/firebase_data_connect/example/lib/generated/add_timestamp.dart

+13-22
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,23 @@ class AddTimestampVariablesBuilder {
44
Timestamp timestamp;
55

66
final FirebaseDataConnect _dataConnect;
7-
AddTimestampVariablesBuilder(
8-
this._dataConnect, {
9-
required this.timestamp,
10-
});
11-
Deserializer<AddTimestampData> dataDeserializer =
12-
(dynamic json) => AddTimestampData.fromJson(jsonDecode(json));
13-
Serializer<AddTimestampVariables> varsSerializer =
14-
(AddTimestampVariables vars) => jsonEncode(vars.toJson());
7+
AddTimestampVariablesBuilder(this._dataConnect, {required this.timestamp,});
8+
Deserializer<AddTimestampData> dataDeserializer = (dynamic json) => AddTimestampData.fromJson(jsonDecode(json));
9+
Serializer<AddTimestampVariables> varsSerializer = (AddTimestampVariables vars) => jsonEncode(vars.toJson());
1510
Future<OperationResult<AddTimestampData, AddTimestampVariables>> execute() {
1611
return ref().execute();
1712
}
1813

1914
MutationRef<AddTimestampData, AddTimestampVariables> ref() {
20-
AddTimestampVariables vars = AddTimestampVariables(
21-
timestamp: timestamp,
22-
);
23-
return _dataConnect.mutation(
24-
"addTimestamp", dataDeserializer, varsSerializer, vars);
15+
AddTimestampVariables vars= AddTimestampVariables(timestamp: timestamp,);
16+
return _dataConnect.mutation("addTimestamp", dataDeserializer, varsSerializer, vars);
2517
}
2618
}
2719

2820
class AddTimestampTimestampHolderInsert {
2921
String id;
30-
AddTimestampTimestampHolderInsert.fromJson(dynamic json)
31-
: id = nativeFromJson<String>(json['id']);
22+
AddTimestampTimestampHolderInsert.fromJson(dynamic json):
23+
id = nativeFromJson<String>(json['id']);
3224

3325
Map<String, dynamic> toJson() {
3426
Map<String, dynamic> json = {};
@@ -43,9 +35,8 @@ class AddTimestampTimestampHolderInsert {
4335

4436
class AddTimestampData {
4537
AddTimestampTimestampHolderInsert timestampHolder_insert;
46-
AddTimestampData.fromJson(dynamic json)
47-
: timestampHolder_insert = AddTimestampTimestampHolderInsert.fromJson(
48-
json['timestampHolder_insert']);
38+
AddTimestampData.fromJson(dynamic json):
39+
timestampHolder_insert = AddTimestampTimestampHolderInsert.fromJson(json['timestampHolder_insert']);
4940

5041
Map<String, dynamic> toJson() {
5142
Map<String, dynamic> json = {};
@@ -60,10 +51,9 @@ class AddTimestampData {
6051

6152
class AddTimestampVariables {
6253
Timestamp timestamp;
63-
@Deprecated(
64-
'fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
65-
AddTimestampVariables.fromJson(Map<String, dynamic> json)
66-
: timestamp = Timestamp.fromJson(json['timestamp']);
54+
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
55+
AddTimestampVariables.fromJson(Map<String, dynamic> json):
56+
timestamp = Timestamp.fromJson(json['timestamp']);
6757

6858
Map<String, dynamic> toJson() {
6959
Map<String, dynamic> json = {};
@@ -75,3 +65,4 @@ class AddTimestampVariables {
7565
required this.timestamp,
7666
});
7767
}
68+

0 commit comments

Comments
 (0)