title: flutter typeahead suggestionbox doesn't hide
body: <p><strong>my problem:</strong></p>
  <p>The suggestionbox doesn't hide, except i choose one suggestion. <code>hideSuggestionsOnKeyboardHide</code> changes absolutely nothing...
  I saw that others solved this problem with another package named keyboardvisibility.
  But for me this is not a solution, beause i don't want the suggestionbox to disappear as soon as the keyboard disappears, I want the suggestionbox to disappear <strong>as soon as I tap somewhere outside the suggestionbox</strong>. Hope someone can help.</p>
  <p>Here my code if it helps:</p>
  <pre><code>TypeAheadField(
            hideOnEmpty: true,
            hideOnError: true,
            suggestionsBoxController: _suggestionsBoxController,
            textFieldConfiguration: TextFieldConfiguration(
                controller: typeAheadControllerA,
                decoration: const InputDecoration(
                  hintText: 'Artikelnummer',
                    icon: const Icon(
                      Icons.business_center,
                      color: Colors.grey,
                    ))),
            suggestionsCallback: (pattern) {
              return autoA
                  .where((autoA) =&gt;
                      autoA.toLowerCase().contains(pattern.toLowerCase()))
                  .toList();
            },
            itemBuilder: (context, suggestion) {
              return ListTile(
                  title: Text(suggestion),
              );
            },
            transitionBuilder: (context, suggestionsBox, controller) {
              return suggestionsBox;
            },
            onSuggestionSelected: (suggestion) {
              typeAheadControllerA.text = suggestion;
            },
          )
  </code></pre>
  <p><strong>Another minor problem/question:</strong></p>
  <p>How can i change the width of the suggestionbox / adapt to the width of the input field?</p>
  <p><a href="https://i.stack.imgur.com/mX0Ba.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mX0Ba.png" alt="enter image description here" /></a></p>
  <p>When I set the icon, logically the width of the input field decreased but the width of the suggestion box did not adapt to the width of the input field. I tried with <code>suggestionsBoxDecoration</code> <code>offsetX</code>. With offsetX I can move the box to the right, but the box keeps its width and therefore goes too far to the right but then i tried with wrapping the typeaheadfield in a padding widget or sizedbox but nothing works. If nobody knows how to solve this, I will probably remove the icons...</p>
  <p>Thanks for help :)</p>