From d8ad067e1159fdaf3a8e4bd2411bf034e7bb818e Mon Sep 17 00:00:00 2001 From: JP Lekkerkerker Date: Fri, 1 May 2020 08:57:21 +0200 Subject: [PATCH] fixes setState() called after dispose(): BaseChartState --- charts_flutter/lib/src/base_chart_state.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts_flutter/lib/src/base_chart_state.dart b/charts_flutter/lib/src/base_chart_state.dart index b4015bc3d..403388002 100644 --- a/charts_flutter/lib/src/base_chart_state.dart +++ b/charts_flutter/lib/src/base_chart_state.dart @@ -68,7 +68,9 @@ class BaseChartState extends State> @override void requestRebuild() { - setState(() {}); + if (mounted) { + setState(() {}); + } } @override