flutter_material_pickers
flutter_material_pickers copied to clipboard
Feature Request : show two scroll picker dialog
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',
),
)
],
);
});
}
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.