enhanceCreatorParams method

  1. @override
Future<void> enhanceCreatorParams(
  1. {required BuildContext context,
  2. required WidgetRef ref,
  3. required AppModel appModel,
  4. required CreatorModel creatorModel,
  5. required EnhancementTriggerCause cause}
)
override

Perform a change to the CreatorModel, executing the functionality of this enhancement. An EnhancementTriggerCause may be used to modify the behavior of the enhancement's function depending on whether the enhancement is being executed on auto, manual or cascade modes.

Implementation

@override
Future<void> enhanceCreatorParams({
  required BuildContext context,
  required WidgetRef ref,
  required AppModel appModel,
  required CreatorModel creatorModel,
  required EnhancementTriggerCause cause,
}) async {
  appModel.openStash(
    onSelect: (selection) {
      creatorModel.getFieldController(field).text = selection;
    },
    onSearch: (selection) {
      appModel.openRecursiveDictionarySearch(
        searchTerm: selection,
        killOnPop: false,
      );
    },
  );
}