From ae85badc74e9378105e34d94f64e3d2189c43560 Mon Sep 17 00:00:00 2001 From: Victor Choueiri Date: Wed, 21 Mar 2018 02:38:05 +0200 Subject: [PATCH] Format with dartfmt --- lib/src/animated_circular_chart.dart | 9 +++++---- lib/src/circular_chart.dart | 12 +++++++----- lib/src/stack.dart | 11 ++++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/src/animated_circular_chart.dart b/lib/src/animated_circular_chart.dart index acaab03..7679d40 100644 --- a/lib/src/animated_circular_chart.dart +++ b/lib/src/animated_circular_chart.dart @@ -26,7 +26,8 @@ class AnimatedCircularChart extends StatefulWidget { this.startAngle = _kStartAngle, this.holeLabel, this.labelStyle, - }) : assert(size != null), + }) + : assert(size != null), super(key: key); /// The size of the bounding box this chart will be constrained to. @@ -201,10 +202,10 @@ class AnimatedCircularChartState extends State void _updateLabelPainter() { if (widget.holeLabel != null) { - TextStyle _labelStyle = widget.labelStyle ?? Theme.of(context).textTheme.body2; + TextStyle _labelStyle = + widget.labelStyle ?? Theme.of(context).textTheme.body2; _labelPainter - ..text = new TextSpan( - style: _labelStyle, text: widget.holeLabel) + ..text = new TextSpan(style: _labelStyle, text: widget.holeLabel) ..textDirection = Directionality.of(context) ..textScaleFactor = MediaQuery.of(context).textScaleFactor ..layout(); diff --git a/lib/src/circular_chart.dart b/lib/src/circular_chart.dart index 7243e63..a340112 100644 --- a/lib/src/circular_chart.dart +++ b/lib/src/circular_chart.dart @@ -11,13 +11,13 @@ class CircularChart { CircularChart(this.stacks, this.chartType); + final List stacks; + final CircularChartType chartType; + factory CircularChart.empty({@required CircularChartType chartType}) { return new CircularChart([], chartType); } - final List stacks; - final CircularChartType chartType; - factory CircularChart.fromData({ @required Size size, @required List data, @@ -60,6 +60,8 @@ class CircularChartTween extends Tween { final MergeTween _stacksTween; @override - CircularChart lerp(double t) => - new CircularChart(_stacksTween.lerp(t), begin.chartType); + CircularChart lerp(double t) => new CircularChart( + _stacksTween.lerp(t), + begin.chartType, + ); } diff --git a/lib/src/stack.dart b/lib/src/stack.dart index 627eb85..70b6757 100644 --- a/lib/src/stack.dart +++ b/lib/src/stack.dart @@ -9,7 +9,12 @@ const double _kMaxAngle = 360.0; class CircularChartStack implements MergeTweenable { CircularChartStack( - this.rank, this.radius, this.width, this.startAngle, this.segments); + this.rank, + this.radius, + this.width, + this.startAngle, + this.segments, + ); final int rank; final double radius; @@ -30,8 +35,8 @@ class CircularChartStack implements MergeTweenable { ? 100.0 : entries.fold( 0.0, - (double prev, CircularSegmentEntry element) => - prev + element.value); + (double prev, CircularSegmentEntry element) => prev + element.value, + ); double previousSweepAngle = 0.0; List segments =