code class="language-dart">@override
State&lt;StatefulWidget&gt; createState() =&gt; new AutoCompleteTextFieldState&lt;String&gt;(
        suggestions,
        textChanged,
        textSubmitted,
        onFocusChanged,
        itemSubmitted, (context, item) {
      return new Padding(padding: EdgeInsets.all(8.0), child: new Text(item));
    }, (a, b) {
      return a.compareTo(b);
    }, (item, query) {
      final regex = RegExp(query, caseSensitive: false);
      return regex.hasMatch(item.toLowerCase())