of static method

_StreamAutocompleteState of(
  1. BuildContext context
)

Returns the nearest StreamAutocomplete ancestor of the given context.

Implementation

static _StreamAutocompleteState of(BuildContext context) {
  final state = context.findAncestorStateOfType<_StreamAutocompleteState>();
  assert(state != null, 'StreamAutocomplete not found in the widget tree');
  return state!;
}