getManualFieldEnhancement method

List<Enhancement> getManualFieldEnhancement(
  1. {required AppModel appModel,
  2. required Field field}
)

Returns a list of enhancements active for a certain field in the persisted enhancements map.

Implementation

List<Enhancement> getManualFieldEnhancement(
    {required AppModel appModel, required Field field}) {
  List<String> enhancementNames =
      getManualFieldEnhancementNames(field: field);
  List<Enhancement> enhancements = enhancementNames
      .map((enhancementName) =>
          appModel.enhancements[field]![enhancementName]!)
      .toList();

  return enhancements;
}