When using the latest version of google_fonts (6.2.0) package in flutter project, I’m facing this ‘Type FontFeature not found’ issue:
/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-6.2.0/lib/src/google_fonts_base.dart:69:8:
Error: 'FontFeature' isn't a type.
List<FontFeature>? fontFeatures,
^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:flutterflutterbinflutter.bat'' finished with non-zero exit value 1
I tried downgrading the package version but the issue persists.
Also tried flutter clean and pub get..
2
Answers
use this google_fonts: ^5.1.0 this worked for me.
downgrading to google_fonts version 6.1.0 would work.error solved here