1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00
This commit is contained in:
Brett Morgan
2022-05-11 12:48:11 -07:00
committed by GitHub
parent fb00d0a102
commit ccd68f34e2
242 changed files with 1719 additions and 1430 deletions

View File

@@ -17,12 +17,12 @@ class LayeredChart extends StatefulWidget {
: super(key: key);
@override
State<StatefulWidget> createState() {
return LayeredChartState();
State<LayeredChart> createState() {
return _LayeredChartState();
}
}
class LayeredChartState extends State<LayeredChart> {
class _LayeredChartState extends State<LayeredChart> {
late List<Path> paths;
late List<Path> capPaths;
late List<double> maxValues;
@@ -167,13 +167,13 @@ class LayeredChartState extends State<LayeredChart> {
return Container(
color: Constants.backgroundColor,
child: CustomPaint(
foregroundPainter: ChartPainter(this, widget.dataToPlot,
foregroundPainter: _ChartPainter(this, widget.dataToPlot,
widget.milestones, 80, 50, 50, 12, 500, widget.animationValue),
child: Container()));
}
}
class ChartPainter extends CustomPainter {
class _ChartPainter extends CustomPainter {
static List<Color?> colors = [
Colors.red[900],
const Color(0xffc4721a),
@@ -208,9 +208,9 @@ class ChartPainter extends CustomPainter {
late Paint linePaint;
late Paint fillPaint;
LayeredChartState state;
_LayeredChartState state;
ChartPainter(
_ChartPainter(
this.state,
this.dataToPlot,
this.milestones,