Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing import for dart:ui in google_fonts_base.dart #600

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

carlos-alex
Copy link

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? 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? fontFeatures,
^^^^^^^^^^^

Checklist

@carlos-alex carlos-alex requested a review from a team as a code owner July 17, 2024 08:40
@carlos-alex carlos-alex requested review from guidezpl and removed request for a team July 17, 2024 08:40
Copy link

google-cla bot commented Jul 17, 2024

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.

@guidezpl
Copy link
Collaborator

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

@carlos-alex
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants