How to downgrade google_fonts version In Flutter

125 views Asked by At

So I was just building an app & I realized I kept getting an error. The error was coming from a google_fonts package that I installed. Apparently, google_fonts^6.2.0 just dropped last night & it has a bunch of bugs. I want to use google_fonts version 6.1.0 but I don't know how. Every time I enter Flutter pub add google_fonts in the terminal, it keeps downloading the latest version which is 6.2.0 & I don't want that. I tried entering the version number in the pubspec.yaml, then entering Flutter pub get in the terminal but that didn't work either. I just want to use google_fonts^6.1.0, if there is a manual way of installing it, I'd like to know as well. Please help.

1

There are 1 answers

1
YUSOF KHAN On BEST ANSWER
  1. Edit pubspec.yaml, save after editing:
dependencies:
  flutter:
    sdk: flutter
  google_fonts: 6.1.0
  1. Run flutter pub get.
  2. Clean and Rebuild (Optional but Recommended):
flutter clean
flutter pub get
flutter run