populateFields method

void populateFields()

Populate maps for fields at startup to optimise performance.

Implementation

void populateFields() async {
  fields = Map<String, Field>.unmodifiable(
    Map<String, Field>.fromEntries(
      globalFields.map(
        (field) => MapEntry(field.uniqueKey, field),
      ),
    ),
  );
}