Skip to content

Commit

Permalink
update to the latest macro APIs (#4093)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 authored Sep 13, 2024
1 parent 7f32403 commit 1befd05
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 169 deletions.
1 change: 1 addition & 0 deletions working/macros/example/benchmark/src/data_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ final myClassMethods = [
identifier: objectIdentifier,
isNullable: false,
typeArguments: const []),
style: ParameterStyle.normal,
)
],
returnType: boolType,
Expand Down
52 changes: 28 additions & 24 deletions working/macros/example/benchmark/src/functional_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,34 +94,38 @@ final myFunction = FunctionDeclarationImpl(
isSetter: false,
namedParameters: [
FormalParameterDeclarationImpl(
id: RemoteInstance.uniqueId,
identifier:
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'title'),
isNamed: true,
isRequired: true,
library: fooLibrary,
metadata: [],
type: stringType),
id: RemoteInstance.uniqueId,
identifier: IdentifierImpl(id: RemoteInstance.uniqueId, name: 'title'),
isNamed: true,
isRequired: true,
library: fooLibrary,
metadata: [],
type: stringType,
style: ParameterStyle.normal,
),
],
positionalParameters: [
FormalParameterDeclarationImpl(
id: RemoteInstance.uniqueId,
identifier:
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'context'),
isNamed: false,
isRequired: true,
library: fooLibrary,
metadata: [],
type: buildContextType),
id: RemoteInstance.uniqueId,
identifier:
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'context'),
isNamed: false,
isRequired: true,
library: fooLibrary,
metadata: [],
type: buildContextType,
style: ParameterStyle.normal,
),
FormalParameterDeclarationImpl(
id: RemoteInstance.uniqueId,
identifier:
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'count'),
isNamed: false,
isRequired: true,
library: fooLibrary,
metadata: [],
type: intType),
id: RemoteInstance.uniqueId,
identifier: IdentifierImpl(id: RemoteInstance.uniqueId, name: 'count'),
isNamed: false,
isRequired: true,
library: fooLibrary,
metadata: [],
type: intType,
style: ParameterStyle.normal,
),
],
returnType: widgetType,
typeParameters: []);
Loading

0 comments on commit 1befd05

Please sign in to comment.