mchome / flutter_colorpicker

HSV(HSB)/HSL/RGB/Material color picker inspired by all the good design for your amazing flutter apps.
https://pub.dev/packages/flutter_colorpicker
MIT License
350 stars 203 forks source link

Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'. EDIT: Master needs to get pushed to pub.dev? #105

Closed mark8044 closed 4 months ago

mark8044 commented 6 months ago

This appears with newer master branch 3.22.x version of flutter

EDIT: This might be fixed in the files already merged in master branch, but the latest master isn't actually pushed to pub.dev so that when this is used as a dependency its on an older version

evgfilim1 commented 6 months ago

The current master branch should definitely be pushed to pub.dev because current published 1.0.3 will break apps depending on this library. Flutter 3.22 was released to beta channel, deprecated bodyText1 and bodyText2 properties from TextTheme class were removed, so it doesn't compile.

For future readers: workaround in your pubspec.yaml:

-   flutter_colorpicker: ^1.0.3
+   flutter_colorpicker:
+     git:
+       url: https://github.com/mchome/flutter_colorpicker
+       ref: master  # or 786d04363f587b818ce585d25b9c2bb62de95aba
adebola-duf commented 5 months ago

@evgfilim1 Thank you so much. It really helped.

mqaa commented 4 months ago

I'm using the package flutter_quill (https://github.com/singerdmx/flutter-quill/issues/1865) that uses this package and building my app fails because of this issue. Any change the changes can be pushed to pub.dev?

phubner commented 4 months ago

Same issue here. Thanks for the workaround @evgfilim1

ledjoncili commented 4 months ago

Same issue. Please publish to pub.dev master branch

KimFromMarietta commented 4 months ago

Same issue, except that the problem occurs because my app depends on dashbook, which depends on flutter_colorpicker. Currently, my app is crashing with flutter 3.22 due to the bodyText1 and bodyText2 deprecated fields

BazinC commented 4 months ago

I would suggest to lock the ref to a known commit instead of pointing to the master branch head, in order to avoid possible unexpected breaking change when updates are pushed to master branch (I had the problem in the past :) ) Exemple here with last known commit 92bdb69a313a56c391ef148c12ef6539bd31253d

  flutter_colorpicker:
    git:
      url: https://github.com/mchome/flutter_colorpicker
      ref: 92bdb69a313a56c391ef148c12ef6539bd31253d

And please @mchome (or whoever managing this package) publish a new version to pub :)

mchome commented 4 months ago

Updated.