Class.fromElement constructor

Class.fromElement(
  1. ClassElement element
)

gets the class from the ClassElement

Implementation

factory Class.fromElement(ClassElement element) {
  final name = element.name;
  final fields = Field.fromElements(element.fields);

  return Class(
    name: name,
    fields: fields,
  );
}