From c09c4497a59232821b22edafbc384d68061533e4 Mon Sep 17 00:00:00 2001 From: Victor Choueiri Date: Wed, 9 May 2018 23:15:34 +0300 Subject: [PATCH] Prefer lowercase enums --- example/animated_radial_chart_example.dart | 2 +- lib/src/animated_circular_chart.dart | 8 ++++---- lib/src/circular_chart.dart | 2 +- lib/src/painter.dart | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/animated_radial_chart_example.dart b/example/animated_radial_chart_example.dart index f7d83f3..560c9ff 100644 --- a/example/animated_radial_chart_example.dart +++ b/example/animated_radial_chart_example.dart @@ -98,7 +98,7 @@ class _AnimatedRadialChartExampleState size: _chartSize, initialChartData: _generateChartData(value), chartType: CircularChartType.Radial, - edgeStyle: SegmentEdgeStyle.Round, + edgeStyle: SegmentEdgeStyle.round, percentageValues: true, holeLabel: '$value%', labelStyle: _labelStyle, diff --git a/lib/src/animated_circular_chart.dart b/lib/src/animated_circular_chart.dart index 265e09f..17e0af0 100644 --- a/lib/src/animated_circular_chart.dart +++ b/lib/src/animated_circular_chart.dart @@ -17,10 +17,10 @@ enum CircularChartType { /// Determines how the ends of a chart's segments should be drawn. enum SegmentEdgeStyle { /// Segments begin and end with a flat edge. - Flat, + flat, /// Segments begin and end with a semi-circle. - Round, + round, } class AnimatedCircularChart extends StatefulWidget { @@ -35,7 +35,7 @@ class AnimatedCircularChart extends StatefulWidget { this.startAngle = _kStartAngle, this.holeLabel, this.labelStyle, - this.edgeStyle = SegmentEdgeStyle.Flat, + this.edgeStyle = SegmentEdgeStyle.flat, }) : assert(size != null), super(key: key); @@ -102,7 +102,7 @@ class AnimatedCircularChart extends StatefulWidget { /// The type of segment edges to be drawn. /// - /// Defaults to [SegmentEdgeStyle.Flat]. + /// Defaults to [SegmentEdgeStyle.flat]. final SegmentEdgeStyle edgeStyle; /// The state from the closest instance of this class that encloses the given context. diff --git a/lib/src/circular_chart.dart b/lib/src/circular_chart.dart index c6ae25c..772190b 100644 --- a/lib/src/circular_chart.dart +++ b/lib/src/circular_chart.dart @@ -12,7 +12,7 @@ class CircularChart { CircularChart( this.stacks, this.chartType, { - this.edgeStyle = SegmentEdgeStyle.Flat, + this.edgeStyle = SegmentEdgeStyle.flat, }); final List stacks; diff --git a/lib/src/painter.dart b/lib/src/painter.dart index 1d81ddb..83efd39 100644 --- a/lib/src/painter.dart +++ b/lib/src/painter.dart @@ -57,7 +57,7 @@ void _paintChart(Canvas canvas, Size size, CircularChart chart) { ..style = chart.chartType == CircularChartType.Radial ? PaintingStyle.stroke : PaintingStyle.fill - ..strokeCap = chart.edgeStyle == SegmentEdgeStyle.Round + ..strokeCap = chart.edgeStyle == SegmentEdgeStyle.round ? StrokeCap.round : StrokeCap.butt;