Fl_chart: Occur error when swiping on bar chart such as example 1 and 2

Created on 21 Apr 2020  ยท  2Comments  ยท  Source: imaNNeoFighT/fl_chart

Describe the bug
When swiping on bar chart example 1 or 2, occur error.
I guess when swiping or tapping the gaps between bars occur errors.

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by gesture โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following NoSuchMethodError was thrown while handling a gesture:
The getter 'length' was called on null.
Receiver: null
Tried calling: length

When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      BarChartPainter._getNearestTouchedSpot (package:fl_chart/src/chart/bar_chart/bar_chart_painter.dart:577:43)
#2      BarChartPainter.handleTouch (package:fl_chart/src/chart/bar_chart/bar_chart_painter.dart:564:9)
#3      _BarChartState.build.<anonymous closure> (package:fl_chart/src/chart/bar_chart/bar_chart.dart:84:58)
#4      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
...
Handler: "onCancel"
Recognizer: PanGestureRecognizer#1bc80
  debugOwner: GestureDetector
  start behavior: start
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

To Reproduce
Use bar chart example 1 and 2 and see the following video

Screenshots

bug-report

Versions

  • which version of the Flutter are you using?
    1.18.0-dev.5.0

  • which version of the FlChart are you using?
    0.9.2 ( cloned master branch today to check example in local )

Bar Chart bug

Most helpful comment

Fixed in 0.9.3,
Thanks for reporting!

All 2 comments

I'm seeing the same problem

Fixed in 0.9.3,
Thanks for reporting!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wukongssl picture wukongssl  ยท  3Comments

satrio1256 picture satrio1256  ยท  6Comments

Mohdx picture Mohdx  ยท  4Comments

jamesblasco picture jamesblasco  ยท  4Comments

kw2019ltd picture kw2019ltd  ยท  6Comments