cupertino picker returns index value instead of String

251 views
Skip to first unread message

Error Place

unread,
Jun 17, 2020, 7:08:28 AM6/17/20
to Flutter Development (flutter-dev)
hey guys. 
does anyone know what i am setting wrong here? 
my cuppertinoPicker shows the Texts as children but when i return the value it gets me the index of chosen item?


int selectedValue;

CupertinoPicker(
onSelectedItemChanged: (value) {
setState(() {
selectedValue = selectedValue;

});
}
Text('New york'),
Text('london'),
Text('stockholm'),


Error Place

unread,
Jun 17, 2020, 8:13:29 AM6/17/20
to Flutter Development (flutter-dev)
Solved , 

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/fad41389-117b-4922-8619-4be7adeb441fo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages