0

In my application i want to navigate among search items using up down keys in flutter desktop app, For search drop down functionality i use flutter_typeahead: ^4.3.7 plugin but i am unable to navigate with keys.

TypeAheadField(
          direction: directionUp?AxisDirection.up:AxisDirection.down,
          textFieldConfiguration: TextFieldConfiguration(
              controller: controller,
              focusNode: focusNode,
              style: TextStyle(fontSize: 13.5, color: Colors.grey.shade600),
              decoration: InputDecoration(
                  border: InputBorder.none,
                  hintText: hintText,
                  hintStyle: TextStyle(fontSize: 13.5, color: Colors.grey.shade500),
                  suffixIcon: const Icon(Icons.keyboard_arrow_down, size: 18,)
              )
          ),
          suggestionsCallback: (pattern) async {
            List list = await updateList(pattern);
            return list;
          },
          itemBuilder: (context, suggestion) {
            return ListTile(
              title: Text(getTextName(suggestion),
                  style: TextStyle(fontSize: 13.5, color: Colors.grey.shade500)),
            );
          },
          onSuggestionSelected: (suggestion) {
            if(suggestion!=null){
              suggestionSelected(suggestion);
            }
          },
        )

0 Answers0