PropertyDescriptor constructor

PropertyDescriptor({
  1. required String name,
  2. required DeclareProperty annotation,
  3. required FieldDescriptor field,
  4. bool hide = false,
  5. Type? editor,
})

Implementation

PropertyDescriptor({required this.name, required this.annotation, required this.field,  this.hide = false, this.editor}) {
    try {
      defaultValue = getTypeDescriptor().constructorParameters
          .firstWhere((param) => param.name == name)
          .defaultValue;
    }
    catch (e) {
      print(1);
    }
}