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: The type 'Diagnosticable' can't be used as supertype. #85

Closed
wasabia opened this issue Mar 14, 2020 · 11 comments
Closed

Error: The type 'Diagnosticable' can't be used as supertype. #85

wasabia opened this issue Mar 14, 2020 · 11 comments

Comments

@wasabia
Copy link
Contributor

wasabia commented Mar 14, 2020

Compiler message:
../../.pub-cache/hosted/pub.flutter-io.cn/flutter_cupertino_date_picker-1.0.12/lib/src/date_picker_theme.dart:23:7: Error: The type 'Diagnosticable' can't be used as supertype.
class DateTimePickerTheme extends Diagnosticable {

Flutter 1.15.22-pre.21
flutter-cupertino-date-picker 1.0.12

@wasabia
Copy link
Contributor Author

wasabia commented Mar 14, 2020

flutter/flutter#51495

@rignaneseleo
Copy link

any fix?

@wasabia
Copy link
Contributor Author

wasabia commented Mar 15, 2020

@rignaneseleo replace extends to with

@rignaneseleo
Copy link

I solved it using Flutter (Channel dev, v1.15.20) instead of Flutter (Channel dev, v1.15.21).

@Lzyct
Copy link

Lzyct commented Mar 18, 2020

Fix it by change extends to with

like this junqi/flutter_datetime_picker@561f98f

@Lzyct
Copy link

Lzyct commented Mar 18, 2020

or you can change it manually
.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.12/lib/src/date_picker_theme.dart

find
class DatePickerTheme extends Diagnosticable
then replace with
class DatePickerTheme with DiagnosticableMixin

@rignaneseleo
Copy link

what should I put in my pubspec then?

@Lzyct
Copy link

Lzyct commented Mar 18, 2020

just use this library, then you can edit manually in $flutter_home/.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_date_picker-1.0.12/lib/src/date_picker_theme.dart

@Lzyct
Copy link

Lzyct commented Mar 18, 2020

or you can direct to path in error message

@rignaneseleo
Copy link

Yes, but I'd like to use a better solution since I'm going to deploy using codemagic and .pub-cache is ignored from github.

@dylanwuzh
Copy link
Owner

Please update 1.0.13 version and try. Modified DatePickerTheme:

class DateTimePickerTheme with DiagnosticableMixin

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

4 participants