podoFields function

List<Tuple<FieldElement, ParameterElement>> podoFields(
  1. ClassElement classElement
)

Returns all PlainOldDartObject fields together with their initializing parameters.

Includes assertPodo

Implementation

List<Tuple<FieldElement, ParameterElement>> podoFields(
    ClassElement classElement) {
  return assertPodo(classElement)
      .unnamedConstructor!
      .parameters
      .map((p) =>
          Tuple(classElement.fields.firstWhere((f) => f.name == p.name), p))
      .toList();
}