i have an AlertDialog and want to use a DropdownButton for changing a value. At first there should be the hint visible. After choosing a value, the value should be visible. But when i use the hint, it never shows the value and vice versa.
DropdownButton(
items: <String>['team1','team2'].map((String val) => DropdownMenuItem<String>(
value: val,
child: Text(val),
)).toList(),
//value: 'team1',
hint: Text('Enter team'),
onChanged: (value) {
teteam.text = value;
}
),
It has the correct function, but visibility isnt quite like i expect.

