DatePickerTheme报错,神马 ~~

flutter build apk 报错

报错的消息居然是flutter里面的文件,请问是什么问题呢,该如何解决,听说是缺包,但是看到不像是缺包啊?

Compiler message:
/E:/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_datetime_picker-1.2.8/lib/src/datetime_picker_theme.dart:14:9: Error: The superclass, ‘Diagnosticable’, has no unnamed constructor that takes no arguments.
const DatePickerTheme({
^^^^^^^^^^^^^^^

Target kernel_snapshot failed: Exception: Errors during snapshot creation: null

build failed.

E:\flutter\bin\flutter.bat --no-color pub get
Running “flutter pub get” in source_second_hand_car… 2.1s
Process finished with exit code 0

flutter_datetime_picker 和 flutter 版本匹配了,具体应该是 DatePickerTheme 的父类变成了 mixin, flutter_datetime_picker 升级到最新或把 flutter 切换到稳定版看看,具体可以参考下这个 issue: