getAllFieldsEntityAnnotations method

Map<String, List<EntityAnnotation>>? getAllFieldsEntityAnnotations([
  1. O? o
])

Implementation

Map<String, List<EntityAnnotation>>? getAllFieldsEntityAnnotations([O? o]) {
  var fieldsNames = this.fieldsNames(o);

  var entries =
      fieldsNames.map((f) {
        var annotations = getFieldEntityAnnotations(o, f);
        return annotations == null ? null : MapEntry(f, annotations);
      }).nonNulls;

  var map = Map<String, List<EntityAnnotation>>.fromEntries(entries);

  return map.isEmpty ? null : map;
}