Skip to content
Boring Doc
BreakingHigh impactOfficial migration guidesince 3.41.0landed 3.39.0-0.0.pre

FontWeight also controls the weight attribute of variable fonts

Framework · Official source

A `FontWeight` in a text style will also set the weight attribute of variable fonts. It is no longer necessary to separately use `FontVariation` to control the weight of these fonts.

Original behavior

Text styles can specify a `FontWeight` value that configures the thickness of the strokes used to paint the text. `FontWeight` will select the closest weight among a set of font files belonging to the same family.

New behavior

Setting the `fontWeight` property of objects such as `TextStyle` will now also set the value of the `wght` variation axis of fonts that support it. Flutter will internally apply the equivalent of adding a `FontVariation('wght')` attribute to the style whose value is the same as the `FontWeight`.

Who is affected
Applications and packages relying on the previous behaviour or signature. Code that uses FontWeight, FontVariation, TextStyle and related APIs.
Practical impact
Behaviour or API differences that can break builds or change runtime behaviour.
What action should I take?
Follow the official migration guide below, update affected call sites, run `dart fix --apply` where a fix is available, then run your tests.
Official migration guide (excerpt, © The Flutter Authors, CC BY 3.0)

Applications may see changes in text rendering if they used variable fonts and were specifying FontWeight in text styles without a matching FontVariation('wght') value.

If these changes are undesirable, then the application should change the FontWeight to a value that achieves the intended rendering. For example, to restore the font's default weight, set fontWeight to FontWeight.normal.

Migration assistantAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Official migration guide·Verified classification (95%)

Listed in the official breaking-changes index (docs.flutter.dev/release/breaking-changes).

An official announcement or migration guide documents an intended behaviour or API change. A verified source change (git diff) shows code changed but does not by itself prove a public API is breaking. AI interpretations are labelled and never used to classify a change.

Source commit
b3045439b7c0
Source last updated
Oct 21, 2026
Last synchronized
Oct 21, 2026
Publication status
published
Publication history
  • Oct 21, 2026, 8:31 PM: new → published (ingestion) — Backed by an official breaking-change/migration guide.
AI explanationAI-generated · grounded in cited sources
AI explanations are not configured
Set AI_PROVIDER (for example to openai-compatible with a local Ollama or LM Studio endpoint) to enable grounded explanations. Everything else on this page works without an AI provider.
Was this useful?