fieldsWithTypeAndAnnotations method

Map<String, TypeInfo> fieldsWithTypeAndAnnotations(
  1. bool typeFilter(
    1. String fieldName,
    2. TypeInfo fieldType,
    3. List<EntityAnnotation>? fieldAnnotations
    ), [
  2. O? o
])

Implementation

Map<String, TypeInfo> fieldsWithTypeAndAnnotations(
  bool Function(
    String fieldName,
    TypeInfo fieldType,
    List<EntityAnnotation>? fieldAnnotations,
  )
  typeFilter, [
  O? o,
]) {
  final fieldsAnnotations = fieldsEntityAnnotations();

  return Map.unmodifiable(
    fieldsTypes(o).entries
        .where((e) => typeFilter(e.key, e.value, fieldsAnnotations[e.key]))
        .toMapFromEntries(),
  );
}