updateFieldInGroup method

void updateFieldInGroup(
  1. String groupId,
  2. OdooField updated
)

Implementation

void updateFieldInGroup(String groupId, OdooField updated) {
  _update((v) => v.copyWith(
        groups: v.groups.map((g) {
          if (g.id != groupId) return g;
          return g.copyWith(
            fields: g.fields
                .map((f) => f.id == updated.id ? updated : f)
                .toList(),
          );
        }).toList(),
      ));
}