google / charts

https://pub.dev/packages/charts_flutter
Apache License 2.0
2.81k stars 1.24k forks source link

'package:charts_common/src/chart/layout/layout_manager_impl.dart': Failed assertion: line 113 pos I/flutter (21963): 12: '_drawAreaBoundsOutdated == false': is not true. #393

Open FairyFanFan opened 4 years ago

FairyFanFan commented 4 years ago

I/flutter (11562): 'package:charts_common/src/chart/layout/layout_manager_impl.dart': Failed assertion: line 115 pos I/flutter (11562): 12: '_drawAreaBoundsOutdated == false': is not true. I/flutter (11562): Either the assertion indicates an error in the framework itself, or we should provide substantially I/flutter (11562): more information in this error message to help you determine and fix the underlying cause.

Found the way to fix it! Actually someone has made a pull request with the fix but It has not been accepted: https://github.com/google/charts/pull/288/files

Originally posted by @spierr in https://github.com/google/charts/issues/118#issuecomment-508851247

  DateTime _lastConfigurationChangeTime;

  /// The minimum time required before the next configuration change.
  static const configurationChangeThresholdMs = 500;
  static const configurationChangeThresholdMs = 100;

  void reconfigure(ChartContainer config, BuildContext context) {
    _chartState = config.chartState;

why this hasn't change? have u make this configurable to ensure it doesn't affect the internal consumers of library?@lorrainekan

chinmay2505 commented 3 years ago

This change is only working in debug build but not working in release builds