flutter_direct_select icon indicating copy to clipboard operation
flutter_direct_select copied to clipboard

Dark mode not working

Open akaymaram opened this issue 4 years ago • 8 comments

Dark mode is not working when running your main.dart in your example directory on my iOS simulator. Once the list is selected the background color changes to white even when dark mode is enabled.

akaymaram avatar Feb 14 '21 22:02 akaymaram

could you add a minimum sample code?

diegoveloper avatar Feb 14 '21 22:02 diegoveloper

I just ran your own main.dart that's in the sample directory without any changes. I ran it on an iOS 14.4 simulator using package version ^1.1.0.

akaymaram avatar Feb 14 '21 22:02 akaymaram

Oh right, you will need to pass the colors https://github.com/diegoveloper/flutter_direct_select/blob/master/lib/src/widget.dart#L26 , it's not extracting the colors from the theme

diegoveloper avatar Feb 14 '21 23:02 diegoveloper

It is possible to set backgroundColor, but it doesn't recognize selectionColor as a correct parameter.

Error: No named parameter with the name 'selectionColor'. selectionColor: Colors.white,

akaymaram avatar Feb 14 '21 23:02 akaymaram

Hmm you are right, I think I didn't publish that new change.

Can you point to the repository directly? Use the github url for now.

diegoveloper avatar Feb 14 '21 23:02 diegoveloper

great, it works now. I can set both selectionColor and backgroundColor. What values do I need to set to them in order to get the direct select appear the way they appear in your dark mode demo?

akaymaram avatar Feb 15 '21 00:02 akaymaram

Oh, hmm I don't remember exactly, you can copy the colors from any OS tools. I'll update the samples today with the dark sample and also I'll publish the new version with selectionColor.

diegoveloper avatar Feb 15 '21 00:02 diegoveloper

thanks, one remaining issue is that even by changing selectionColor you can't change the item's text color the way you have it in the dark theme demo.

akaymaram avatar Feb 15 '21 00:02 akaymaram