Comments (4)
I resolved this on my own download. It's because the underlying gradient isn't drawn correctly, as you can see the red section is much larger than the blue, but they should be equal in length. It's a lot more noticeable if you increase the stroke width to something like 20+.
Luckily it's fixed with one line change.
In the _CirclePickerPainter class in flutter_circle_color_picker.dart, the class responsible for drawing the circle and it's gradient, change the createShader lines as follows (commented our old line in favour of the new one). Note that to avoid conflicts, I had to rename the "center" variable in this class to be called "circleCenter" instead. Here's the change:
final sweepShader = sweepGradient.createShader(
// Rect.fromLTWH(0, 0, radio, radio), // --> OLD line
Rect.fromCircle(center: circleCenter, radius: radio), // New Line; changed "centre" to "circleCenter"
);
from flutter_circle_color_picker.
@mavanpee Thank you! Would you make PR to fix this?
from flutter_circle_color_picker.
Hehe.. I'll be completely honest with you, one of the reasons I was being so descriptive in my post is because I have absolutely no idea how to do a PR myself. I've never really used github before.
from flutter_circle_color_picker.
Thanks, I created PR and merged.
#10
from flutter_circle_color_picker.
Related Issues (13)
- The color selected does not match the color ring HOT 2
- How to return color value on onChangeEnd? HOT 3
- Cant pan inside scroll view HOT 1
- Make hex code editable HOT 1
- Flutter Web displaying single color for entire ring HOT 2
- Plans for null safety? HOT 1
- Initial Color not being used HOT 2
- Less an issue than a feature request
- Request: Option for custom text HOT 5
- Request: Change color from external widget HOT 10
- Flutter Web issue. HOT 2
- pub.dev is still 0.1.1 HOT 2
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_circle_color_picker.