diff --git a/lib/pages/home/main.dart b/lib/pages/home/main.dart index 24af8a1a..2b3a2652 100644 --- a/lib/pages/home/main.dart +++ b/lib/pages/home/main.dart @@ -54,8 +54,17 @@ class _HomeMainState extends State final List catChartData = []; final Map budgetInfos = {}; + @override + void initState() { + super.initState(); + + context.read().transStock!.addListener(_refreshStats); + } + @override void dispose() { + context.read().transStock!.removeListener(_refreshStats); + super.dispose(); }