Skip to content

Commit

Permalink
Fix the setStat issue on the ListView
Browse files Browse the repository at this point in the history
Fix the setStat issue on the ListView
  • Loading branch information
imhafeez committed Oct 9, 2020
1 parent 1d39257 commit 079e92f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/chart/pie_chart/pie_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class _PieChartState extends AnimatedWidgetBaseState<PieChart> {
void initState() {
/// Make sure that [_badgeWidgetsOffsets] is updated.
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {});
if (mounted) {
setState(() {});
}
});
super.initState();
}
Expand Down

0 comments on commit 079e92f

Please sign in to comment.