diff --git a/example/lib/line_chart/samples/line_chart_sample8.dart b/example/lib/line_chart/samples/line_chart_sample8.dart index 96d192301..a97227e09 100644 --- a/example/lib/line_chart/samples/line_chart_sample8.dart +++ b/example/lib/line_chart/samples/line_chart_sample8.dart @@ -22,7 +22,8 @@ class _LineChartSample8State extends State { Future loadImage(String asset) async { final ByteData data = await rootBundle.load(asset); - final ui.Codec codec = await ui.instantiateImageCodec(data.buffer.asUint8List()); + final ui.Codec codec = + await ui.instantiateImageCodec(data.buffer.asUint8List()); final ui.FrameInfo fi = await codec.getNextFrame(); return fi.image; } @@ -50,7 +51,8 @@ class _LineChartSample8State extends State { aspectRatio: 1.70, child: Container( child: Padding( - padding: const EdgeInsets.only(right: 18.0, left: 12.0, top: 24, bottom: 12), + padding: const EdgeInsets.only( + right: 18.0, left: 12.0, top: 24, bottom: 12), child: LineChart( mainData(imageSnapshot.data), ), @@ -128,16 +130,21 @@ class _LineChartSample8State extends State { ], ), gridData: FlGridData( - show: true, drawVerticalLine: false, drawHorizontalLine: false, verticalInterval: 1), + show: true, + drawVerticalLine: false, + drawHorizontalLine: false, + verticalInterval: 1), titlesData: FlTitlesData( show: true, bottomTitles: SideTitles( showTitles: true, reservedSize: 22, - getTextStyles: (value) => const TextStyle(color: Colors.black87, fontSize: 10), + getTextStyles: (value) => + const TextStyle(color: Colors.black87, fontSize: 10), interval: 4, margin: 8, - checkToShowTitle: (minValue, maxValue, sideTitles, appliedInterval, value) => true, + checkToShowTitle: + (minValue, maxValue, sideTitles, appliedInterval, value) => true, ), leftTitles: SideTitles( interval: 2, @@ -151,8 +158,10 @@ class _LineChartSample8State extends State { ), ), lineTouchData: LineTouchData( - fullHeightTouchLine: true, - getTouchedSpotIndicator: (LineChartBarData barData, List spotIndexes) { + getTouchLineEnd: (data, index) => double.infinity, + touchLineEndAtDot: false, + getTouchedSpotIndicator: + (LineChartBarData barData, List spotIndexes) { return spotIndexes.map((spotIndex) { return TouchedSpotIndicatorData( FlLine(color: Colors.orange, strokeWidth: 3), @@ -166,8 +175,9 @@ class _LineChartSample8State extends State { tooltipBgColor: Colors.blueAccent, ), ), - borderData: - FlBorderData(show: true, border: Border.all(color: const Color(0xffecf1fe), width: 1)), + borderData: FlBorderData( + show: true, + border: Border.all(color: const Color(0xffecf1fe), width: 1)), minX: 0, maxX: 11, minY: 0, @@ -196,7 +206,8 @@ class _LineChartSample8State extends State { ), belowBarData: BarAreaData( show: false, - colors: gradientColors.map((color) => color.withOpacity(0.5)).toList(), + colors: + gradientColors.map((color) => color.withOpacity(0.5)).toList(), ), ), ],