services/autocomplete_service library

Constants

acsDebug → const bool
debounceDuration → const Duration

Functions

applySuggestionSelectedValue({required Map<String, dynamic> selectedItem, required Map<String, dynamic> config, required String fieldName, required String encodedValue}) → void
Applies a picked suggestion the same way genericsuite-fe does: writes the form field's own fieldName and only the keys listed in autocomplete_fields. Related-table columns such as _id / name are not copied onto the row.
applySuggestionTypedValue(Map<String, dynamic> selectedItem, String fieldName, String? value) → void
Writes a manually typed suggestion-dropdown value into selectedItem.
suggestionOptionLabels(Iterable<Map<String, dynamic>> rows, String? descField) List<String>
Autocomplete labels from rows using descField. Skips null/empty.
suggestionRowsFromResultset(dynamic resultset) List<Map<String, dynamic>>
Normalizes a GenericSuite resultset into a list of row maps. Listing endpoints often send a JSON string (see CrudEditor._loadItems); FDA-style endpoints send an already-decoded list.