Pyozer / flutter_material_color_picker

Material color picker, you can customize colors. Selection in two step, first main color and after shades.
https://pub.dartlang.org/packages/flutter_material_color_picker
MIT License
75 stars 38 forks source link

Fix issue with media query and circle size #30

Closed SoftWyer closed 1 year ago

SoftWyer commented 1 year ago

This change fixes an issue with the circle size as it was based on the width of the device. The larger the width, the smaller the rendered circle size. This issue is demonstrated in the attached video. But you could also see the same problem with the example when rotating between portrait and landscape.

https://github.com/Pyozer/flutter_material_color_picker/assets/1913052/8b1659f5-bbc9-4028-a3d5-b4244139c99a

Main change was to use a Wrap, rather than a GridView as this ensures a consistent circle size.

Other changes were made to enable the example to run.

Video showing the fix:

https://github.com/Pyozer/flutter_material_color_picker/assets/1913052/19c74f77-7663-45d9-9ce5-b9519111b1af

Pyozer commented 1 year ago

Hi, thank you for this PR ! I will merge it and made a new release ;)