skip to Main Content

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


  1. use this google_fonts: ^5.1.0 this worked for me.

    Login or Signup to reply.
  2. downgrading to google_fonts version 6.1.0 would work.error solved here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search