title: How to get the value of selected list items in flutter
body: <p>I have made a custom list of langugages named as languagesList like this</p>
  <pre><code>List&lt;String&gt; languagesList = [
      &quot;English&quot;,
      &quot;German&quot;,
      &quot;Spanish&quot;,
      &quot;French&quot;,
      &quot;Italian&quot;,
      &quot;Portuguese&quot;,
      &quot;Latin&quot;,
      &quot;Urdu&quot;,
      &quot;Hindi&quot;,
      &quot;Chinese&quot;,
      &quot;Japanese&quot;
    ];
  </code></pre>
  <p>and I am using <a href="https://docs.getwidget.dev/gf-multiselect/" rel="nofollow noreferrer">GF Multi Select</a> to select the values from the dropdown. Now I want the values to be sent to firebase and for that I have made a button on which I've used firebase query but the value coming from the selected list is index only not the actual language name coming from list. I am a newbie I don't know why and how to do it. If anyone knows then please let me know.</p>
  <p>The empty List selectedlanguages is</p>
  <pre><code>List &lt;dynamic&gt; selectedLanguages = [];
  </code></pre>
  <p>Here's the rest of my code:</p>
  <pre><code>GFMultiSelect(
                              items: dropList,
                              onSelect: (value) {
                                selectedLanguages = value;
                                print(selectedLanguages);
                              },
                              dropdownTitleTileText:
                                  'Select your preferred languages',
                              dropdownTitleTileColor: Colors.white,
                              dropdownTitleTileMargin:
                                  const EdgeInsets.only(top: 5, bottom: 5),
                              dropdownTitleTilePadding: const EdgeInsets.all(10),
                              dropdownUnderlineBorder: const BorderSide(
                                  color: Colors.transparent, width: 2),
                              dropdownTitleTileBorder:
                                  Border.all(color: Colors.grey, width: 1),
                              dropdownTitleTileBorderRadius:
                                  BorderRadius.circular(5),
                              expandedIcon: const Icon(
                                Icons.keyboard_arrow_down,
                                color: Colors.black54,
                              ),
                              collapsedIcon: const Icon(
                                Icons.keyboard_arrow_up,
                                color: Colors.black54,
                              ),
                              submitButton: const Text('Select'),
                              dropdownTitleTileTextStyle: const TextStyle(
                                  fontSize: 14, color: Colors.black54),
                              padding: const EdgeInsets.all(6),
                              margin: const EdgeInsets.all(6),
                              type: GFCheckboxType.custom,
                              customBgColor: const Color(0xFF2a3b6a),
                              activeBgColor: const Color(0xFF2a3b6a),
                              buttonColor: const Color(0xFF2a3b6a),
                              inactiveBorderColor: Colors.grey,
                            ),
  </code></pre>