Skip to content

Commit

Permalink
fix: destroy chart on dispose google#780
Browse files Browse the repository at this point in the history
  • Loading branch information
MattyBoy4444 authored Jul 25, 2022
1 parent d8ef37a commit 00da8b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts_flutter/lib/src/chart_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ class ChartContainerRenderObject<D> extends RenderCustomPaint
a11yNodes: _a11yNodes ?? [],
textDirection: textDirection);
}

@override
void dispose() {
_chart!.destroy();
super.dispose();
}
}

class ChartContainerCustomPaint extends CustomPainter {
Expand Down

0 comments on commit 00da8b8

Please sign in to comment.