fluttercandies / flutter-interactive-chart

A candlestick chart that supports pinch-to-zoom and panning.
https://pub.dev/packages/interactive_chart
MIT License
209 stars 66 forks source link

InteractiveChart crash on setState #12

Open Gioxxy opened 2 years ago

Gioxxy commented 2 years ago

Widget crash on final int end = (start + count).clamp(start, widget.candles.length); with Invalid argument(s): 432 in _InteractiveChartState build function when i set the state with new candles data, cause start > widget.candles.length

Gioxxy commented 2 years ago

A workaround is adding a unique key:

InteractiveChart(
    key: UniqueKey(),