ServerBodyAnnotation.fromElement constructor
ServerBodyAnnotation.fromElement(
- DartObject object,
- ElementAnnotation annotation
Implementation
factory ServerBodyAnnotation.fromElement(
DartObject object,
// ignore: avoid_unused_constructor_parameters
ElementAnnotation annotation,
) {
final access = object.getField('access')?.toListValue()?.map((e) {
return e.toStringValue()!;
}).toList();
final pipe = object.getField('pipe')?.toTypeValue();
return ServerBodyAnnotation(
access: access,
pipe: ServerPipe.fromType(pipe),
);
}