flutter_colorpicker icon indicating copy to clipboard operation
flutter_colorpicker copied to clipboard

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

Open mark8044 opened this issue 10 months ago • 4 comments

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

mark8044 avatar Mar 31 '24 22:03 mark8044

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

evgfilim1 avatar Apr 06 '24 09:04 evgfilim1

@evgfilim1 Thank you so much. It really helped.

adebola-duf avatar Apr 17 '24 12:04 adebola-duf

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?

mqaa avatar May 14 '24 15:05 mqaa

Same issue here. Thanks for the workaround @evgfilim1

phubner avatar May 14 '24 17:05 phubner

Same issue. Please publish to pub.dev master branch

ledjoncili avatar May 15 '24 08:05 ledjoncili

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

KimFromMarietta avatar May 16 '24 21:05 KimFromMarietta

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

BazinC avatar May 17 '24 13:05 BazinC

Updated.

mchome avatar May 19 '24 07:05 mchome