flutter_material_pickers icon indicating copy to clipboard operation
flutter_material_pickers copied to clipboard

Feature Request : show two scroll picker dialog

Open tz182736 opened this issue 4 years ago • 1 comments

I like to show 2 scroll picker side by side. below is my sample code.

 void selectTypeAndTime() {
    var selectedUsState = "Connecticut";
    List<String> stateList = <String>[
      'Alabama',
      'Alaska',
      'Arizona',
      'Arkansas',
      'California',
      'Colorado',
      'Connecticut',
    ];
    List<String> cityList = <String>[
      'City 1',
      'City 2',
      'City 3',
    ];
    showDialog<String>(
        context: context,
        builder: (BuildContext context) {
          return Row(
            mainAxisSize: MainAxisSize.min,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Expanded(
                child: ScrollPickerDialog(
                  items: stateList,
                  title: 'Pick Package',
                  initialItem: 'Alabama',
                ),
              ),
              Expanded(
                child: ScrollPickerDialog(
                  items: cityList,
                  title: 'Pick Package',
                  initialItem: 'City 1',
                ),
              )
            ],
          );
        });
  }

tz182736 avatar Mar 17 '20 07:03 tz182736

I do want to add this concept, but in your example, I assume you would want the list of cities to filter based on the selected state? That's functionality probably beyond what the widget would provide.

codegrue avatar Apr 02 '20 14:04 codegrue