jonataslaw / readmore

A Flutter plugin than allow expand and collapse text dynamically
MIT License
257 stars 79 forks source link

Error: Type 'TextScaler' not found. #66

Open bxTruong opened 5 months ago

bxTruong commented 5 months ago

image

My Flutter version 3.19.6 Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.6, on macOS 14.2.1 23C71 darwin-arm64 (Rosetta), locale vi-VN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.88.1)

This library is not working

maRci002 commented 5 months ago

run flutter clear -> flutter pub upgrade

It should be available https://api.flutter.dev/flutter/painting/TextScaler-class.html

bxTruong commented 5 months ago

Sure I did those things, and my Flutter version was the latest but it still didn't work.

run flutter clear -> flutter pub upgrade

It should be available https://api.flutter.dev/flutter/painting/TextScaler-class.html

maRci002 commented 5 months ago

Do you have multiple flutter versions on your PC? Maybe the default one is 3.19.6 which is used by terminal however your IDE uses old one.

What does flutter analyze says when you run it at root level of the project?

One more thing you can go to your pub-cache and manually remove every readmore then run flutter pub get

yugeshpoudel45 commented 2 weeks ago

I used previous version to resolve this issue.. I think it has this issue in this version. Previous version used: readmore: ^2.2.0