flutter-cupertino-date-picker icon indicating copy to clipboard operation
flutter-cupertino-date-picker copied to clipboard

error with Flutter 2

Open monammedoz opened this issue 3 years ago • 8 comments

I got the below error after upgrading to flutter2

any help please

Xcode's output: ↳ ../../../../Flutter_dev/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 { ^^^^^^^^^^^^^^^^^^^ ../../../../Flutter_dev/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 { ^ ../../../../Flutter_dev/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), ^^^^^^^^^^^^^^^ ../../../../Flutter_dev/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) {

monammedoz avatar Mar 24 '21 14:03 monammedoz

I have the same problem too !

gillesgnanagbe avatar Mar 28 '21 01:03 gillesgnanagbe

I have the same problem too !

ningyibo avatar Apr 06 '21 15:04 ningyibo

Same problem

shenanigan avatar Apr 12 '21 08:04 shenanigan

same problem

yashmittalJTG avatar May 03 '21 10:05 yashmittalJTG

Found a fix for now.

  • Open the DatePicker class (Control+click)
  • Comment this line // theme: Theme.of(context, shadowThemeOnly: true),

Marcosmaliki avatar May 03 '21 12:05 Marcosmaliki

For this you have to fork the whole repo of date picker.. You cannot access or modify file which you are using in your project through reference

On Mon, 3 May, 2021, 5:52 pm Marcos Maliki, @.***> wrote:

Found a fix for now.

  • Open the DatePicker class (Control+click)
  • Comment this line // theme: Theme.of(context, shadowThemeOnly: true),

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dylanwuzh/flutter-cupertino-date-picker/issues/149#issuecomment-831224152, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARCO3X5TEPL34R6NGEDQGMLTL2IP5ANCNFSM4ZXLAPVQ .

yashmittalJTG avatar May 03 '21 15:05 yashmittalJTG

If you've use this plugin in one or two projects then modifying the local project files is just easier and faster. And yes, any plugin can be modified direct in code.

Marcosmaliki avatar May 03 '21 18:05 Marcosmaliki

Thanks for the tip!

On Mon, 3 May, 2021, 11:37 pm Marcos Maliki, @.***> wrote:

If you've use this plugin in one or two projects then modifying the local project files is just easier and faster. And yes, any plugin can be modified direct in code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dylanwuzh/flutter-cupertino-date-picker/issues/149#issuecomment-831433342, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARCO3X6AUOTX3YG2X272ZHLTL3Q6LANCNFSM4ZXLAPVQ .

yashmittalJTG avatar May 03 '21 18:05 yashmittalJTG