getFields method
List<ApiRequestMapEntity>
getFields(
- BuildContext context,
- List<
ApiRequestMapEntity> originalFields, - List<
RequestActionFieldEntity> newFields, - int loop,
Implementation
List<ApiRequestMapEntity> getFields(
BuildContext context,
List<ApiRequestMapEntity> originalFields,
List<RequestActionFieldEntity> newFields,
int loop,
) {
return originalFields.map((e) {
final index = newFields.indexWhere((element) => element.id == e.id);
if (index == -1) return e;
return e.copyWith(
value: newFields[index].value.get(
context: context,
loop: loop,
),
);
}).toList();
}