Skip to content

Commit 1befd05

Browse files
authored
update to the latest macro APIs (#4093)
1 parent 7f32403 commit 1befd05

File tree

4 files changed

+199
-169
lines changed

4 files changed

+199
-169
lines changed

working/macros/example/benchmark/src/data_class.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ final myClassMethods = [
235235
identifier: objectIdentifier,
236236
isNullable: false,
237237
typeArguments: const []),
238+
style: ParameterStyle.normal,
238239
)
239240
],
240241
returnType: boolType,

working/macros/example/benchmark/src/functional_widget.dart

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,34 +94,38 @@ final myFunction = FunctionDeclarationImpl(
9494
isSetter: false,
9595
namedParameters: [
9696
FormalParameterDeclarationImpl(
97-
id: RemoteInstance.uniqueId,
98-
identifier:
99-
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'title'),
100-
isNamed: true,
101-
isRequired: true,
102-
library: fooLibrary,
103-
metadata: [],
104-
type: stringType),
97+
id: RemoteInstance.uniqueId,
98+
identifier: IdentifierImpl(id: RemoteInstance.uniqueId, name: 'title'),
99+
isNamed: true,
100+
isRequired: true,
101+
library: fooLibrary,
102+
metadata: [],
103+
type: stringType,
104+
style: ParameterStyle.normal,
105+
),
105106
],
106107
positionalParameters: [
107108
FormalParameterDeclarationImpl(
108-
id: RemoteInstance.uniqueId,
109-
identifier:
110-
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'context'),
111-
isNamed: false,
112-
isRequired: true,
113-
library: fooLibrary,
114-
metadata: [],
115-
type: buildContextType),
109+
id: RemoteInstance.uniqueId,
110+
identifier:
111+
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'context'),
112+
isNamed: false,
113+
isRequired: true,
114+
library: fooLibrary,
115+
metadata: [],
116+
type: buildContextType,
117+
style: ParameterStyle.normal,
118+
),
116119
FormalParameterDeclarationImpl(
117-
id: RemoteInstance.uniqueId,
118-
identifier:
119-
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'count'),
120-
isNamed: false,
121-
isRequired: true,
122-
library: fooLibrary,
123-
metadata: [],
124-
type: intType),
120+
id: RemoteInstance.uniqueId,
121+
identifier: IdentifierImpl(id: RemoteInstance.uniqueId, name: 'count'),
122+
isNamed: false,
123+
isRequired: true,
124+
library: fooLibrary,
125+
metadata: [],
126+
type: intType,
127+
style: ParameterStyle.normal,
128+
),
125129
],
126130
returnType: widgetType,
127131
typeParameters: []);

0 commit comments

Comments
 (0)