Flutter: iOS CupertinoPicker Implementation Code

CupertinoPicker is an iOS feature that is used to pick and item from a list. It provides a function similar to the dropdown feature in Android.

Flutter Code for CupertinoPicker

const List<String> currenciesList = [

  CupertinoPicker iOSPicker(){
    List<Text> pickerItems = [];

    for(String currency in currenciesList){

    return CupertinoPicker(
      backgroundColor: Colors.lightBlue,
      itemExtent: 32.0,
      onSelectedItemChanged: (selectedIndex){
      children: pickerItems,
            height: 150.0,
            alignment: Alignment.center,
            padding: EdgeInsets.only(bottom: 30.0),
            color: Colors.lightBlue,
            child:  iOSPicker(),

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *