flutter:处理报错:Unimplemented handling of missing static target(flutter 3.7.0)

一,控制台报错信息:

======== Exception caught by widgets library =======================================================
The following _CompileTimeError was thrown building ItemList(dirty, dependencies: [_InheritedTheme, 
_LocalizationsScope
-[GlobalKey#b3ae5]], state: _MyLoad#3f5e2): Unimplemented handling of missing static target The relevant error-causing widget was: ItemList ItemList:file:///Users/liuhongdi/StudioProjects/demolist/lib/main.dart:29:13
如图:
模拟器如图:

说明:刘宏缔的架构森林是一个专注架构的博客,

网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/06/04/flutter-chu-li-bao-cuo-unimplemented-handling-of-missing/

         对应的源码可以访问这里获取: https://github.com/liuhongdi/
         或: https://gitee.com/liuhongdi

说明:作者:刘宏缔 邮箱: 371125307@qq.com

二,解决:

原因:报错是因为修改类名或其他操作后使用hot reload导致,
解决方法有两个:
1,重启:
 
2,hot restart:

三,查看flutter的版本:

liuhongdi@liuhongdideMBP ~ % flutter --version
Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b06b8b2710 (10 days ago) • 2023-01-23 16:55:55 -0800
Engine • revision b24591ed32
Tools • Dart 2.19.0 • DevTools 2.20.1 

 

posted @ 2023-02-03 17:51  刘宏缔的架构森林  阅读(237)  评论(0编辑  收藏  举报