Skip to main content

All Questions

Tagged with
0 votes
1 answer
47 views

Change 'String?' from DropdownFormField to 'String'

In my code, I have this DropdownFormField so the user can select their gender: DropdownButtonFormField<String>( decoration: InputDecoration(labelText: 'Select gender'), ...
Mateus Neves's user avatar
2 votes
1 answer
356 views

Flutter Dropdown Button error: The argument type 'void Function(String)' can't be assigned to the parameter type 'void Function(String?)?

I am trying to use a drop down for my flutter app but I always get the error The argument type 'void Function(String)' can't be assigned to the parameter type 'void Function(String?)?'. Widget ...
Secret Coder's user avatar
0 votes
1 answer
3k views

How to implement Array in Dropdown in flutter

I am getting the comma separated string from the server. Then I am converting that to an array by using .split(). I have to populate that array into a dropdown list of flutter. How to do that. Here is ...
Shivam Srivastava's user avatar