codegrue / flutter_material_pickers

A flutter package for displaying common picker dialogs.
https://pub.dev/packages/flutter_material_pickers
MIT License
98 stars 61 forks source link

CardSettingsListPicker : ScrollPicker shows a divider that cuts focused item in half #56

Closed celariss closed 3 months ago

celariss commented 8 months ago

To begin, thank you for your wonderful library :)

In CardSettingsListPicker, when the user wants to change the selected value, a ScrollPicker is shown with "showDivider" property set to true (default), resulting in an ugly line that cuts the selected value in half.

I have this issue in Web, Desktop and Android envs.

Image of the issue : image

The problem is fixed by providing "showDivider=false" in card_settings_list_picker.dart, line 151 :

 void _showMaterialScrollPicker(String label, T? selectedItem) {
    showMaterialScrollPicker<T?>(
      context: context,
      title: label,
      items: items,
      showDivider: false, // <= here is the new line
      selectedItem: selectedItem,
      onChanged: (value) {
        didChange(value);
        if (widget.onChanged != null) widget.onChanged!(value);
      },
    );

Image with the fix : image

Far better ;)

I didn't find any solution that does not need at least a change in flutter_material_pickers code ...

codegrue commented 3 months ago

This will be fixed on 3.7.0