flutter-packages icon indicating copy to clipboard operation
flutter-packages copied to clipboard

Fix missing import for dart:ui in google_fonts_base.dart

Open carlos-alex opened this issue 1 year ago • 3 comments

Description

I encountered an error when using the google_fonts package, specifically version 6.2.0. The error is related to the missing FontFeature type. It appears that the import for dart:ui is missing in the google_fonts_base.dart file. Adding the missing import resolves the issue and ensures that the FontFeature type is recognized.

Tests

The change is a simple import addition, which doesn't affect the logic of the package but fixes the compilation error. Manual testing was performed to ensure the package compiles and works correctly after the import addition.

Issues

Fixes #

I did not create an issue for this fix. This pull request addresses the following error directly:

AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-6.2.0/lib/src/google_fonts_base.dart:69:8: Error: Type 'FontFeature' not found. List<FontFeature>? fontFeatures, ^^^^^^^^^^^ 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, ^^^^^^^^^^^

Checklist

carlos-alex avatar Jul 17 '24 08:07 carlos-alex

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jul 17 '24 08:07 google-cla[bot]

I suspect you're using an old Flutter version, can you please flutter upgrade and try again?

guidezpl avatar Jul 18 '24 08:07 guidezpl

I suspect you're using an old Flutter version, can you please flutter upgrade and try again?

You're right, after the Flutter upgrade, the error stopped occurring.

... after hours upgrading because of package restrictions and all that, thanks a bunch, mate.

cheers

carlos-alex avatar Jul 21 '24 11:07 carlos-alex