title: Flutter DropDownSearch value resets on changing focus to other widgets
body: <p>I am using a <a href="https://pub.dev/packages/dropdown_search/example" rel="nofollow noreferrer">dropdownsearch</a> for creating a dropdown search widget in a layout, the problem when I change the focus to other widgets the value kind of resets every time. The plugin also has a property called selected item, if you use that on changing the focus it resets to the initially selected item.</p>
  <p><a href="https://i.stack.imgur.com/sSBWl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sSBWl.jpg" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/e34MC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e34MC.jpg" alt="enter image description here" /></a>/dropdown_search/example</p>
  <p>here is my code:</p>
  <pre><code>DropdownSearch&lt;StudyName&gt;(
                           mode: Mode.BOTTOM_SHEET,
  
                           items: _studyNamemodel,
                           itemAsString: (StudyName u) =&gt; u.studyName,
                           onChanged: (StudyName data) { print(data.modalityIDFkey);
                           //FocusScope.of(context).nextFocus();
                           _selectedStudyname=data.studyName;
                           },
                           maxHeight: 300,
                           onFind: (String filter) =&gt; getData(filter),
                           label: &quot;Study Name&quot;,
                         ),
  </code></pre>