【发布时间】:2021-06-11 03:34:06
【问题描述】:
更新 Flutter SDK 2.0 后,我遇到了以下错误。
../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker_theme.dart:23:32:错误:类型'未找到 DiagnosticableMixin。 类 DateTimePickerTheme 与 DiagnosticableMixin { ^^^^^^^^^^^^^^^^^^^ ../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker_theme.dart:23:7:错误:类型“DiagnosticableMixin”不能混进去。 类 DateTimePickerTheme 与 DiagnosticableMixin { ^ ../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker.dart:103:34:错误:没有命名参数命名为“shadowThemeOnly”。 主题:Theme.of(context, shadowThemeOnly: true), ^^^^^^^^^^^^^^^ ../../SDK/flutter/packages/flutter/lib/src/material/theme.dart:107:20:上下文:找到了这个候选人,但参数不匹配。 static ThemeData of(BuildContext context) {
【问题讨论】: