flutter_in_action_source_code
flutter_in_action_source_code copied to clipboard
代码缺少实现 ChangeNotifier 类
看7.3 跨组件状态共享(Provider)的时候发现跑不了,来跑代码,拉下来之后发现项目里面好像缺少实现 ChangeNotifier
类
Undefined class 'ChangeNotifier'. Try changing the name to the name of an existing class, or creating a class with the name 'ChangeNotifier'.
基于这个commit的最新代码 commit
可能是版本的太低的问题, 我的是有的, 在包 flutter/packages/flutter/lib/src/foundation 下, 我的版本是 environment: sdk: ">=2.1.0 <3.0.0"