mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Beta (#1234)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user