dylanwuzh / flutter-cupertino-date-picker

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

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

Closed wasabia closed 4 years ago

wasabia commented 4 years ago
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 commented 4 years ago

https://github.com/flutter/flutter/pull/51495

rignaneseleo commented 4 years ago

any fix?

wasabia commented 4 years ago

@rignaneseleo replace extends to with

rignaneseleo commented 4 years ago

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

Lzyct commented 4 years ago

Fix it by change extends to with

like this https://github.com/junqi/flutter_datetime_picker/commit/561f98fdcc5f210fb81cc45db5925df3b0c23d2d

Lzyct commented 4 years ago

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 commented 4 years ago

what should I put in my pubspec then?

Lzyct commented 4 years ago

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 commented 4 years ago

or you can direct to path in error message

rignaneseleo commented 4 years ago

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 commented 4 years ago

Please update 1.0.13 version and try. Modified DatePickerTheme:

class DateTimePickerTheme with DiagnosticableMixin