icemanbsi / searchable_dropdown

MIT License
107 stars 166 forks source link

Close button label text as a parameter #7

Closed lcuis closed 4 years ago

lcuis commented 4 years ago

This PR is proposing the possibility to specify the search dialog box Close button label text. Here is an example of use with the replacement of "Close" by "Cancel":

             new SearchableDropdown(
                items: items,
                value: selectedValue,
                isCaseSensitiveSearch: true,
                hint: new Text(
                  'Select One'
                ),
                searchHint: new Text(
                  'Select One',
                  style: new TextStyle(
                      fontSize: 20
                  ),
                ),
                onChanged: (value) {
                  setState(() {
                    selectedValue = value;
                  });
                },
                closeButtonText: "Cancel",//Replaces the "Close" of the search dialog box by a "Cancel"
              ),

I personally use this for translation.

lcuis commented 4 years ago

Closing this pull request because of new pull request with the clear button.