From 660fdb769d9a461cf3b3aa4ac5f6debba755f1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rulong=20Chen=EF=BC=88=E9=99=88=E6=B1=9D=E9=BE=99=EF=BC=89?= <26625149+0xZOne@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:08:45 +0800 Subject: [PATCH] Fixes exception in platform_channels (#1480) --- platform_channels/lib/src/pet_list_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform_channels/lib/src/pet_list_screen.dart b/platform_channels/lib/src/pet_list_screen.dart index c3b7b0056..b36a2b850 100644 --- a/platform_channels/lib/src/pet_list_screen.dart +++ b/platform_channels/lib/src/pet_list_screen.dart @@ -20,8 +20,8 @@ class _PetListScreenState extends State { final scaffoldKey = GlobalKey(); @override - void initState() { - super.initState(); + void didChangeDependencies() { + super.didChangeDependencies(); // Receives a string of json object from the platform and converts it // to PetModel. final scaffoldMessenger = ScaffoldMessenger.of(context);