Skip to content

Feature Request : show two scroll picker dialog #1

Open

Description

@tz182736

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',
                ),
              )
            ],
          );
        });
  }

Activity

  1. codegrue commented on Apr 2, 2020

    @codegrue
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions