ServerLifecycleComponent.fromDartObject constructor
ServerLifecycleComponent.fromDartObject(
- ElementAnnotation annotation
Implementation
factory ServerLifecycleComponent.fromDartObject(
ElementAnnotation annotation,
) {
final element = annotation.element?.enclosingElement;
if (element is! ClassElement) {
throw Exception('Invalid element type');
}
final arguments = AnnotationArguments.fromDartObject(annotation);
return ServerLifecycleComponent.fromClassElement(element, arguments);
}