1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Fixes exception in platform_channels (#1480)

This commit is contained in:
Rulong Chen(陈汝龙)
2022-10-19 12:08:45 +08:00
committed by GitHub
parent d99fb974a0
commit 660fdb769d

View File

@@ -20,8 +20,8 @@ class _PetListScreenState extends State<PetListScreen> {
final scaffoldKey = GlobalKey<ScaffoldState>(); final scaffoldKey = GlobalKey<ScaffoldState>();
@override @override
void initState() { void didChangeDependencies() {
super.initState(); super.didChangeDependencies();
// Receives a string of json object from the platform and converts it // Receives a string of json object from the platform and converts it
// to PetModel. // to PetModel.
final scaffoldMessenger = ScaffoldMessenger.of(context); final scaffoldMessenger = ScaffoldMessenger.of(context);