Fix DropDownContacts
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
502f8f7f11
commit
dfe67b01ae
|
@ -18,7 +18,7 @@ class DropdownContacts extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _DropdownContactsState extends State<DropdownContacts> {
|
||||
late String selected;
|
||||
String? selected;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -27,13 +27,11 @@ class _DropdownContactsState extends State<DropdownContacts> {
|
|||
items: Provider.of<ProfileInfoState>(context, listen: false).contactList.contacts.map<DropdownMenuItem<String>>((ContactInfoState contact) {
|
||||
return DropdownMenuItem<String>(value: contact.onion, child: Text(contact.nickname));
|
||||
}).toList(),
|
||||
onChanged: (newVal) {
|
||||
onChanged: (String? newVal) {
|
||||
setState(() {
|
||||
this.selected = newVal.toString();
|
||||
this.selected = newVal;
|
||||
});
|
||||
if (widget.onChanged != null) {
|
||||
widget.onChanged(newVal);
|
||||
}
|
||||
widget.onChanged(newVal);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue