ServerQueryAnnotation.fromElement constructor
ServerQueryAnnotation.fromElement(
- DartObject object,
- ElementAnnotation annotation
Implementation
factory ServerQueryAnnotation.fromElement(
DartObject object,
// ignore: avoid_unused_constructor_parameters
ElementAnnotation annotation,
) {
final name = object.getField('name')?.toStringValue();
final pipe = object.getField('pipe')?.toTypeValue();
final all = object.getField('all')?.toBoolValue();
return ServerQueryAnnotation(
all: all ?? false,
name: name,
pipe: ServerPipe.fromType(pipe),
);
}