Skip to content

[google_fonts] Allow the HTTP client to be configured #182429

Description

@bramp

Use case

google_fonts will request fonts from the Internet. Today it uses an internally created http client to make these requests. Due to how it's constructed the http client can't be modified by users, in production or even for mocking in tests.

It would be useful to configure the httpClient, so additional properties can be set (e.g proxies, user agents, etc). Additionally in tests, it would be useful to mock this client out to test for specific behaviours.

Proposal

Move the internal httpClient to be a property on the Config object. So it can be configured by the user.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterp: google_fontsPackage to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions