Prefer lowercase enums

This commit is contained in:
Victor Choueiri 2018-05-09 23:15:34 +03:00 committed by Victor Choueiri
parent 3bcc37359d
commit c09c4497a5
4 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ class _AnimatedRadialChartExampleState
size: _chartSize, size: _chartSize,
initialChartData: _generateChartData(value), initialChartData: _generateChartData(value),
chartType: CircularChartType.Radial, chartType: CircularChartType.Radial,
edgeStyle: SegmentEdgeStyle.Round, edgeStyle: SegmentEdgeStyle.round,
percentageValues: true, percentageValues: true,
holeLabel: '$value%', holeLabel: '$value%',
labelStyle: _labelStyle, labelStyle: _labelStyle,

View File

@ -17,10 +17,10 @@ enum CircularChartType {
/// Determines how the ends of a chart's segments should be drawn. /// Determines how the ends of a chart's segments should be drawn.
enum SegmentEdgeStyle { enum SegmentEdgeStyle {
/// Segments begin and end with a flat edge. /// Segments begin and end with a flat edge.
Flat, flat,
/// Segments begin and end with a semi-circle. /// Segments begin and end with a semi-circle.
Round, round,
} }
class AnimatedCircularChart extends StatefulWidget { class AnimatedCircularChart extends StatefulWidget {
@ -35,7 +35,7 @@ class AnimatedCircularChart extends StatefulWidget {
this.startAngle = _kStartAngle, this.startAngle = _kStartAngle,
this.holeLabel, this.holeLabel,
this.labelStyle, this.labelStyle,
this.edgeStyle = SegmentEdgeStyle.Flat, this.edgeStyle = SegmentEdgeStyle.flat,
}) : assert(size != null), }) : assert(size != null),
super(key: key); super(key: key);
@ -102,7 +102,7 @@ class AnimatedCircularChart extends StatefulWidget {
/// The type of segment edges to be drawn. /// The type of segment edges to be drawn.
/// ///
/// Defaults to [SegmentEdgeStyle.Flat]. /// Defaults to [SegmentEdgeStyle.flat].
final SegmentEdgeStyle edgeStyle; final SegmentEdgeStyle edgeStyle;
/// The state from the closest instance of this class that encloses the given context. /// The state from the closest instance of this class that encloses the given context.

View File

@ -12,7 +12,7 @@ class CircularChart {
CircularChart( CircularChart(
this.stacks, this.stacks,
this.chartType, { this.chartType, {
this.edgeStyle = SegmentEdgeStyle.Flat, this.edgeStyle = SegmentEdgeStyle.flat,
}); });
final List<CircularChartStack> stacks; final List<CircularChartStack> stacks;

View File

@ -57,7 +57,7 @@ void _paintChart(Canvas canvas, Size size, CircularChart chart) {
..style = chart.chartType == CircularChartType.Radial ..style = chart.chartType == CircularChartType.Radial
? PaintingStyle.stroke ? PaintingStyle.stroke
: PaintingStyle.fill : PaintingStyle.fill
..strokeCap = chart.edgeStyle == SegmentEdgeStyle.Round ..strokeCap = chart.edgeStyle == SegmentEdgeStyle.round
? StrokeCap.round ? StrokeCap.round
: StrokeCap.butt; : StrokeCap.butt;