srtraj / dropdown_textfield

custom dropdown
MIT License
8 stars 48 forks source link

MultiSelection dropdown closes immediately on tap of checkbox #22

Closed sharpsaravanan closed 1 year ago

sharpsaravanan commented 1 year ago

MultiSelection dropdown closes immediately on tap of checkbox( unable to set checkbox state) after upgrading to flutter stable version 3.7.0. code: dropdown_textfield example code

flutter --version
Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision b06b8b2710 (6 days ago) • 2023-01-23 16:55:55 -0800 Engine • revision b24591ed32 Tools • Dart 2.19.0 • DevTools 2.20.1

sharpsaravanan commented 1 year ago

_textFieldFocusNode.addListener(() { if (!_searchFocusNode.hasFocus && !_textFieldFocusNode.hasFocus && _isExpanded)

Modify _textFieldFocusNode.addListener(() as

_textFieldFocusNode.addListener(() { if (!_searchFocusNode.hasFocus && !_textFieldFocusNode.hasFocus && !widget.isMultiSelection && _isExpanded)

acamenhas commented 1 year ago

Same problem here

Flutter 3.7.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision c07f788888 (6 days ago) • 2023-02-22 17:52:33 -0600 Engine • revision 0f359063c4 Tools • Dart 2.19.2 • DevTools 2.20.1