Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with Flutter 2 #149

Open
monammedoz opened this issue Mar 24, 2021 · 8 comments
Open

error with Flutter 2 #149

monammedoz opened this issue Mar 24, 2021 · 8 comments

Comments

@monammedoz
Copy link

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
Copy link

I have the same problem too !

1 similar comment
@ningyibo
Copy link

ningyibo commented Apr 6, 2021

I have the same problem too !

@shenanigan
Copy link

Same problem

@yashmittalJTG
Copy link

same problem

@Marcosmaliki
Copy link

Found a fix for now.

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

@yashmittalJTG
Copy link

yashmittalJTG commented May 3, 2021 via email

@Marcosmaliki
Copy link

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
Copy link

yashmittalJTG commented May 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants