Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

/C:/Users/win%2010/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:28: Error: Type 'DiagnosticableMixin' not found.
class DatePickerTheme with DiagnosticableMixin {
                       ^^^^^^^^^^^^^^^^^^^
/C:/Users/win%2010/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class DatePickerTheme with DiagnosticableMixin {
  ^


FAILURE: Build failed with an exception.

* Where:
Script 'D:weexflutterpackagesflutter_toolsgradleflutter.gradle' line: 899

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:weexflutterinflutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 42s
Exception: Gradle task assembleDebug failed with exit code 1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
346 views
Welcome To Ask or Share your Answers For Others

1 Answer

你的 flutter 是 1.20.0+ 吧。DiagnosticableMixin 被移除了。
所以你引用的 package 无法编译。

解决方案:

  1. 使用 flutter 的 stable 版本。
  2. fork 那个 package ,将 DiagnosticableMixin 替换为 Diagnosticable。
  3. 临时使用我的 fork

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...