dylanwuzh / flutter-cupertino-date-picker

Flutter cupertino style date picker.
Apache License 2.0
363 stars 414 forks source link

error with Flutter 2 #149

Open monammedoz opened 3 years ago

monammedoz commented 3 years ago

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) {

gillesgnanagbe commented 3 years ago

I have the same problem too !

ningyibo commented 3 years ago

I have the same problem too !

shenanigan commented 3 years ago

Same problem

yashmittalJTG commented 3 years ago

same problem

Marcosmaliki commented 3 years ago

Found a fix for now.

yashmittalJTG commented 3 years ago

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 .

Marcosmaliki commented 3 years ago

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.

yashmittalJTG commented 3 years ago

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 .