ControllerAnnotation.fromAnnotation constructor

ControllerAnnotation.fromAnnotation(
  1. DartObject annotation
)

Implementation

factory ControllerAnnotation.fromAnnotation(DartObject annotation) {
  final path = annotation.getField('path')?.toStringValue();

  if (path == null) {
    throw Exception('Controller path is required');
  }

  return ControllerAnnotation(path);
}