Prefer lowercase enums
This commit is contained in:
parent
3bcc37359d
commit
c09c4497a5
@ -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,
|
||||
|
@ -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.
|
||||
|
@ -12,7 +12,7 @@ class CircularChart {
|
||||
CircularChart(
|
||||
this.stacks,
|
||||
this.chartType, {
|
||||
this.edgeStyle = SegmentEdgeStyle.Flat,
|
||||
this.edgeStyle = SegmentEdgeStyle.flat,
|
||||
});
|
||||
|
||||
final List<CircularChartStack> stacks;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user