flutter-candlesticks
flutter-candlesticks copied to clipboard
Feature/parameterized colors
I've closed #3 by mistake but this time I nailed it, I fixed the precision issue, you were right @trentpiercy .
so I'm drawing strokes inside of the rect using oRect.deflate(rectPaint.strokeWidth/2)it's quite clean.
having Paints as parameters instead of colors, allows for customizing of the line size, color and style within one property, pretty awesome.
also added candleSpacing
decreasePaint: new Paint()
..color = Colors.red
..strokeWidth = 1.0
..style = PaintingStyle.fill
,
increasePaint: new Paint()
..color = Colors.green
..strokeWidth = 1.0
..style = PaintingStyle.fill
,
volumePaint: new Paint()
..color = new Color.fromARGB(15, 255, 255, 255)
..style = PaintingStyle.fill,
candleSpacing: 1.2,
default values are left as default (green stroke, red fill, volume same)