csc_picker icon indicating copy to clipboard operation
csc_picker copied to clipboard

showState = false doesn't work properly

Open AKhashi opened this issue 3 years ago • 3 comments

Hi,

I need to be able to show only Countries and Cities lists but I found that showState = true/false flag does not work properly:

  • if to set layout: Layout.vertical then State dropdown list is shown regardless to the value of showState
  • if layout is not set and showState: false then Countries doprdown list is shown only (even if showCities is true);

I took a look on your source code in csc_picker.dart and found that when CSC widget is being built there is no check of showState/showCities at all when layout is vertical, and when layout is not set it shows Cities list only if showState is true.

AKhashi avatar Sep 21 '21 13:09 AKhashi

Exactly,, am currently using it now,, I want to exclude the city,, but showCity false even disabled the state dropdown

latestbob avatar Sep 22 '21 13:09 latestbob

Exactly,, am currently using it now,, I want to exclude the city,, but showCity false even disabled the state dropdown

Hii @latestbob state dropdown gets disabled because you have not selected country once country is selected then state dropdown should work.

and this is feature request ......we should have one more field as disabledState which will be boolean and then we can use it as per our requirement @altafc22

I am also facing one issue here https://github.com/altafc22/csc_picker/issues/37#issuecomment-923814425

bipindubey-technoark avatar Sep 23 '21 06:09 bipindubey-technoark

@altafc22 thank you for being a very responsive developer and not fixing this in 3 years

mrsrmn avatar Jun 21 '24 17:06 mrsrmn