@@ -27,17 +27,17 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
2727 LocatableDiagnostic Function ({required Object p0, required Object p1})
2828 >
2929 conflictingKey = TransformSetErrorTemplate (
30- 'conflicting_key' ,
31- "The key '{0}' can't be used when '{1}' is also used." ,
30+ name : 'conflicting_key' ,
31+ problemMessage : "The key '{0}' can't be used when '{1}' is also used." ,
3232 withArguments: _withArgumentsConflictingKey,
3333 expectedTypes: [ExpectedType .object, ExpectedType .object],
3434 );
3535
3636 /// No parameters.
3737 static const TransformSetErrorWithoutArguments expectedPrimary =
3838 TransformSetErrorWithoutArguments (
39- 'expected_primary' ,
40- "Expected either an identifier or a string literal." ,
39+ name : 'expected_primary' ,
40+ problemMessage : "Expected either an identifier or a string literal." ,
4141 expectedTypes: [],
4242 );
4343
@@ -48,8 +48,9 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
4848 LocatableDiagnostic Function ({required Object p0, required Object p1})
4949 >
5050 incompatibleElementKind = TransformSetErrorTemplate (
51- 'incompatible_element_kind' ,
52- "An element of kind '{0}' can't be replaced by an element of kind '{1}'." ,
51+ name: 'incompatible_element_kind' ,
52+ problemMessage:
53+ "An element of kind '{0}' can't be replaced by an element of kind '{1}'." ,
5354 withArguments: _withArgumentsIncompatibleElementKind,
5455 expectedTypes: [ExpectedType .object, ExpectedType .object],
5556 );
@@ -61,8 +62,9 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
6162 LocatableDiagnostic Function ({required Object p0, required Object p1})
6263 >
6364 invalidChangeForKind = TransformSetErrorTemplate (
64- 'invalid_change_for_kind' ,
65- "A change of type '{0}' can't be used for an element of kind '{1}'." ,
65+ name: 'invalid_change_for_kind' ,
66+ problemMessage:
67+ "A change of type '{0}' can't be used for an element of kind '{1}'." ,
6668 withArguments: _withArgumentsInvalidChangeForKind,
6769 expectedTypes: [ExpectedType .object, ExpectedType .object],
6870 );
@@ -73,8 +75,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
7375 LocatableDiagnostic Function ({required Object p0})
7476 >
7577 invalidCharacter = TransformSetErrorTemplate (
76- 'invalid_character' ,
77- "Invalid character '{0}'." ,
78+ name : 'invalid_character' ,
79+ problemMessage : "Invalid character '{0}'." ,
7880 withArguments: _withArgumentsInvalidCharacter,
7981 expectedTypes: [ExpectedType .object],
8082 );
@@ -85,8 +87,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
8587 LocatableDiagnostic Function ({required Object p0})
8688 >
8789 invalidKey = TransformSetErrorTemplate (
88- 'invalid_key' ,
89- "Keys must be of type 'String' but found the type '{0}'." ,
90+ name : 'invalid_key' ,
91+ problemMessage : "Keys must be of type 'String' but found the type '{0}'." ,
9092 withArguments: _withArgumentsInvalidKey,
9193 expectedTypes: [ExpectedType .object],
9294 );
@@ -97,19 +99,20 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
9799 LocatableDiagnostic Function ({required Object p0})
98100 >
99101 invalidParameterStyle = TransformSetErrorTemplate (
100- 'invalid_parameter_style' ,
101- "The parameter style must be one of the following: {0}." ,
102+ name : 'invalid_parameter_style' ,
103+ problemMessage : "The parameter style must be one of the following: {0}." ,
102104 withArguments: _withArgumentsInvalidParameterStyle,
103105 expectedTypes: [ExpectedType .object],
104106 );
105107
106108 /// No parameters.
107- static const TransformSetErrorWithoutArguments invalidRequiredIf =
108- TransformSetErrorWithoutArguments (
109- 'invalid_required_if' ,
109+ static const TransformSetErrorWithoutArguments
110+ invalidRequiredIf = TransformSetErrorWithoutArguments (
111+ name: 'invalid_required_if' ,
112+ problemMessage:
110113 "The key 'requiredIf' can only be used with optional named parameters." ,
111- expectedTypes: [],
112- );
114+ expectedTypes: [],
115+ );
113116
114117 /// Parameters:
115118 /// Object p0: the key with which the value is associated
@@ -123,8 +126,9 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
123126 })
124127 >
125128 invalidValue = TransformSetErrorTemplate (
126- 'invalid_value' ,
127- "The value of '{0}' should be of type '{1}' but is of type '{2}'." ,
129+ name: 'invalid_value' ,
130+ problemMessage:
131+ "The value of '{0}' should be of type '{1}' but is of type '{2}'." ,
128132 withArguments: _withArgumentsInvalidValue,
129133 expectedTypes: [
130134 ExpectedType .object,
@@ -140,8 +144,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
140144 LocatableDiagnostic Function ({required Object p0, required Object p1})
141145 >
142146 invalidValueOneOf = TransformSetErrorTemplate (
143- 'invalid_value_one_of' ,
144- "The value of '{0}' must be one of the following: '{1}'." ,
147+ name : 'invalid_value_one_of' ,
148+ problemMessage : "The value of '{0}' must be one of the following: '{1}'." ,
145149 withArguments: _withArgumentsInvalidValueOneOf,
146150 expectedTypes: [ExpectedType .object, ExpectedType .object],
147151 );
@@ -152,8 +156,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
152156 LocatableDiagnostic Function ({required Object p0})
153157 >
154158 missingKey = TransformSetErrorTemplate (
155- 'missing_key' ,
156- "Missing the required key '{0}'." ,
159+ name : 'missing_key' ,
160+ problemMessage : "Missing the required key '{0}'." ,
157161 withArguments: _withArgumentsMissingKey,
158162 expectedTypes: [ExpectedType .object],
159163 );
@@ -164,17 +168,17 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
164168 LocatableDiagnostic Function ({required Object p0})
165169 >
166170 missingOneOfMultipleKeys = TransformSetErrorTemplate (
167- 'missing_one_of_multiple_keys' ,
168- "Exactly one of the following keys must be provided: {0}." ,
171+ name : 'missing_one_of_multiple_keys' ,
172+ problemMessage : "Exactly one of the following keys must be provided: {0}." ,
169173 withArguments: _withArgumentsMissingOneOfMultipleKeys,
170174 expectedTypes: [ExpectedType .object],
171175 );
172176
173177 /// No parameters.
174178 static const TransformSetErrorWithoutArguments missingTemplateEnd =
175179 TransformSetErrorWithoutArguments (
176- 'missing_template_end' ,
177- "Missing the end brace for the template." ,
180+ name : 'missing_template_end' ,
181+ problemMessage : "Missing the end brace for the template." ,
178182 expectedTypes: [],
179183 );
180184
@@ -184,17 +188,17 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
184188 LocatableDiagnostic Function ({required Object p0})
185189 >
186190 missingToken = TransformSetErrorTemplate (
187- 'missing_token' ,
188- "Expected to find {0}." ,
191+ name : 'missing_token' ,
192+ problemMessage : "Expected to find {0}." ,
189193 withArguments: _withArgumentsMissingToken,
190194 expectedTypes: [ExpectedType .object],
191195 );
192196
193197 /// No parameters.
194198 static const TransformSetErrorWithoutArguments missingUri =
195199 TransformSetErrorWithoutArguments (
196- 'missing_uri' ,
197- "At least one URI must be provided." ,
200+ name : 'missing_uri' ,
201+ problemMessage : "At least one URI must be provided." ,
198202 expectedTypes: [],
199203 );
200204
@@ -204,8 +208,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
204208 LocatableDiagnostic Function ({required Object p0})
205209 >
206210 undefinedVariable = TransformSetErrorTemplate (
207- 'undefined_variable' ,
208- "The variable '{0}' isn't defined." ,
211+ name : 'undefined_variable' ,
212+ problemMessage : "The variable '{0}' isn't defined." ,
209213 withArguments: _withArgumentsUndefinedVariable,
210214 expectedTypes: [ExpectedType .object],
211215 );
@@ -216,8 +220,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
216220 LocatableDiagnostic Function ({required Object p0})
217221 >
218222 unexpectedTransformSetToken = TransformSetErrorTemplate (
219- 'unexpected_transform_set_token' ,
220- "Didn't expect to find {0}." ,
223+ name : 'unexpected_transform_set_token' ,
224+ problemMessage : "Didn't expect to find {0}." ,
221225 withArguments: _withArgumentsUnexpectedTransformSetToken,
222226 expectedTypes: [ExpectedType .object],
223227 );
@@ -228,8 +232,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
228232 LocatableDiagnostic Function ({required Object p0})
229233 >
230234 unknownAccessor = TransformSetErrorTemplate (
231- 'unknown_accessor' ,
232- "The accessor '{0}' is invalid." ,
235+ name : 'unknown_accessor' ,
236+ problemMessage : "The accessor '{0}' is invalid." ,
233237 withArguments: _withArgumentsUnknownAccessor,
234238 expectedTypes: [ExpectedType .object],
235239 );
@@ -240,26 +244,27 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
240244 LocatableDiagnostic Function ({required Object p0})
241245 >
242246 unsupportedKey = TransformSetErrorTemplate (
243- 'unsupported_key' ,
244- "The key '{0}' isn't supported." ,
247+ name : 'unsupported_key' ,
248+ problemMessage : "The key '{0}' isn't supported." ,
245249 withArguments: _withArgumentsUnsupportedKey,
246250 expectedTypes: [ExpectedType .object],
247251 );
248252
249253 /// No parameters.
250254 static const TransformSetErrorWithoutArguments unsupportedStatic =
251255 TransformSetErrorWithoutArguments (
252- 'unsupported_static' ,
253- "The key 'static' is only supported for elements in a class, enum, "
256+ name: 'unsupported_static' ,
257+ problemMessage:
258+ "The key 'static' is only supported for elements in a class, enum, "
254259 "extension, or mixin." ,
255260 expectedTypes: [],
256261 );
257262
258263 /// No parameters.
259264 static const TransformSetErrorWithoutArguments unsupportedVersion =
260265 TransformSetErrorWithoutArguments (
261- 'unsupported_version' ,
262- "Only version '1' is supported at this time." ,
266+ name : 'unsupported_version' ,
267+ problemMessage : "Only version '1' is supported at this time." ,
263268 expectedTypes: [],
264269 );
265270
@@ -270,8 +275,8 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
270275 LocatableDiagnostic Function ({required Object p0, required Object p1})
271276 >
272277 wrongToken = TransformSetErrorTemplate (
273- 'wrong_token' ,
274- "Expected to find {0}, but found {1}." ,
278+ name : 'wrong_token' ,
279+ problemMessage : "Expected to find {0}, but found {1}." ,
275280 withArguments: _withArgumentsWrongToken,
276281 expectedTypes: [ExpectedType .object, ExpectedType .object],
277282 );
@@ -282,24 +287,22 @@ class TransformSetErrorCode extends DiagnosticCodeWithExpectedTypes {
282287 LocatableDiagnostic Function ({required Object p0})
283288 >
284289 yamlSyntaxError = TransformSetErrorTemplate (
285- 'yaml_syntax_error' ,
286- "Parse error: {0}" ,
290+ name : 'yaml_syntax_error' ,
291+ problemMessage : "Parse error: {0}" ,
287292 withArguments: _withArgumentsYamlSyntaxError,
288293 expectedTypes: [ExpectedType .object],
289294 );
290295
291296 /// Initialize a newly created error code to have the given [name] .
292- const TransformSetErrorCode (
293- String name,
294- String problemMessage, {
297+ const TransformSetErrorCode ({
298+ required super . name,
299+ required super . problemMessage,
295300 super .correctionMessage,
296301 super .hasPublishedDocs = false ,
297302 super .isUnresolvedIdentifier = false ,
298303 String ? uniqueName,
299304 required super .expectedTypes,
300305 }) : super (
301- name: name,
302- problemMessage: problemMessage,
303306 type: DiagnosticType .COMPILE_TIME_ERROR ,
304307 uniqueName: 'TransformSetErrorCode.${uniqueName ?? name }' ,
305308 );
@@ -442,9 +445,9 @@ final class TransformSetErrorTemplate<T extends Function>
442445 final T withArguments;
443446
444447 /// Initialize a newly created error code to have the given [name] .
445- const TransformSetErrorTemplate (
446- super .name,
447- super .problemMessage, {
448+ const TransformSetErrorTemplate ({
449+ required super .name,
450+ required super .problemMessage,
448451 super .correctionMessage,
449452 super .hasPublishedDocs = false ,
450453 super .isUnresolvedIdentifier = false ,
@@ -457,9 +460,9 @@ final class TransformSetErrorTemplate<T extends Function>
457460final class TransformSetErrorWithoutArguments extends TransformSetErrorCode
458461 with DiagnosticWithoutArguments {
459462 /// Initialize a newly created error code to have the given [name] .
460- const TransformSetErrorWithoutArguments (
461- super .name,
462- super .problemMessage, {
463+ const TransformSetErrorWithoutArguments ({
464+ required super .name,
465+ required super .problemMessage,
463466 super .correctionMessage,
464467 super .hasPublishedDocs = false ,
465468 super .isUnresolvedIdentifier = false ,
0 commit comments