onFieldSubmitted<T extends Object> static method

void onFieldSubmitted<T extends Object>(
  1. GlobalKey<State<StatefulWidget>> key
)

Calls PerfectAutocompleteFieldViewBuilder's onFieldSubmitted callback for the RawAutocomplete widget indicated by the given GlobalKey.

This is not typically used unless a custom field is implemented instead of using fieldViewBuilder. In the typical case, the onFieldSubmitted callback is passed via the PerfectAutocompleteFieldViewBuilder signature. When not using fieldViewBuilder, the same callback can be called by using this static method.

See also:

  • focusNode and textController, which contain a code example showing how to create a separate field outside of fieldViewBuilder.

Implementation

static void onFieldSubmitted<T extends Object>(GlobalKey key) {
  final _PerfectRawAutocompleteState<T> rawAutocomplete =
      key.currentState! as _PerfectRawAutocompleteState<T>;
  rawAutocomplete._onFieldSubmitted();
}