upgrade-to-flutter-3 #1

Merged
motia merged 9 commits from upgrade-to-flutter-2 into master 2022-09-11 16:22:21 +00:00
Showing only changes of commit 35a2d8ccdb - Show all commits

View file

@ -12,6 +12,14 @@ class ExpensesChart extends StatefulWidget {
class ExpensesChartState extends State {
int? touchedIndex;
bool disposed = false;
@override
void dispose() {
disposed = true;
super.dispose();
}
@override
Widget build(BuildContext context) {
List<String> categories =
@ -24,6 +32,7 @@ class ExpensesChartState extends State {
pieTouchData:
PieTouchData(touchCallback: (event, pieTouchResponse) {
if (pieTouchResponse == null) return;
if (disposed) return;
setState(() {
if (event is FlLongPressEnd || event is FlPanEndEvent) {