Comments (6)
Hey that makes sense. And your English is fine, never apologize.
Actually, what do you think about adding a property allowShades: bool
so that the material_color_picker can be used with only the main colors if needed. We can then use the flag to determine the behavior of the callbacks too.
from flutter_material_color_picker.
I understand but, when you choose the main color, a shade color is automatically selected. Calling the onColorChange
is useful when you use this color picker in a dialog, if the user choose the main color and after submit the dialog without select the shade color.
You can wrap it, store the current shade color and if the dialog is submit (and not canceled), return the color. You can check how I use it here: https://github.com/Pyozer/MyAgenda_Flutter/blob/master/lib/widgets/settings/list_tile_color.dart
Instead of remove the call of onColorChange
when mainColor is chosen, we can add a parameter to call it or not.
If the onColorChange
is not calling after the mainColor and the user just submit the dialog after chosen the mainColor, the color will be lost.
(Sorry if my english is not good 😆)
from flutter_material_color_picker.
Yeah it's a great idea, I will merge your PR ;)
from flutter_material_color_picker.
Awesome, I've updated the docs and change list. Let me know if there's any issues with it.
from flutter_material_color_picker.
Thank you for your PR, I merged it and publish new version to pub ;)
I also made a small fix for mainColor with selectedColor
parameter.
Also, I add an example project with the package ;)
from flutter_material_color_picker.
Awesome. I can't wait to use it.
from flutter_material_color_picker.
Related Issues (18)
- Doesn't have black color option HOT 1
- readme.md images are broken HOT 1
- Add onBack prop HOT 3
- Error in v1.0.4 HOT 1
- Can we able to select multiple color? HOT 2
- Color Expansion: No Shades available
- Programmatically set color? HOT 1
- Padding is missing at bottom HOT 1
- How to set default color? HOT 1
- Crash on call
- my error : The getter 'dx' was called on null. Receiver: null Tried calling: dx
- CircleColor's onColorChange should return the chosen color HOT 1
- Null safety migration HOT 7
- MaterialColorPicker not working in Dialog HOT 1
- Could I customize or change back button color if my background is white color?
- How to reduce the size of color picker? HOT 1
- accent colors? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_material_color_picker.