getFields method
List<SupasetFilterEntity>
getFields(
- BuildContext context,
- List<
SupasetFilterEntity> originalFields, - List<
SupabaseActionFieldEntity> newFields, - int loop,
Implementation
List<SupasetFilterEntity> getFields(
BuildContext context,
List<SupasetFilterEntity> originalFields,
List<SupabaseActionFieldEntity> 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();
}