1
votes

After Update flutter SDK 2.0 i am getting below error.

../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker_theme.dart:23:32: Error: Type 'DiagnosticableMixin' not found. class DateTimePickerTheme with 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: Error: The type 'DiagnosticableMixin' can't be mixed in. class DateTimePickerTheme with DiagnosticableMixin { ^ ../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker.dart:103:34: Error: No named parameter with the name 'shadowThemeOnly'. theme: Theme.of(context, shadowThemeOnly: true), ^^^^^^^^^^^^^^^ ../../SDK/flutter/packages/flutter/lib/src/material/theme.dart:107:20: Context: Found this candidate, but the arguments don't match. static ThemeData of(BuildContext context) {

1

1 Answers

3
votes

check flutter_cupertino_date_picker lib. date_picker_theme.dart file have Below Code.

 class DateTimePickerTheme with DiagnosticableMixin {
  }

In Flutter 2.0 version they remove falvor DiagnosticableMixin. so remove DiagnosticableMixin with Diagnosticable. change date_picker_theme.dart file as per below code.

  class DateTimePickerTheme with Diagnosticable {
  }