原作者没有写全,我来补一点。
Error: Type ‘DiagnosticableMixin‘ not found.
原因:flutter1.20.0+以上DiagnosticableMixin 被移除了。
解决办法:
进入到flutter的SDK目录下
比如:我的SDK目录
D:\Android\flutter\.pub-cache\hosted\pub.flutter-io.cn\flutter_cupertino_date_picker-1.0.26+2\lib\src
1.在lib/src/date_picker_theme.dart中找到DateTimePickerTheme类
2.将继承的DiagnosticableMixin 类替换为 Diagnosticable类
然后就能正常运行了