Skip to content

[material_ui] Clarify density support for material 3 expressive components #195973

Closed

Description

@ChristopherMuir

Background

Historically, Flutter has supported density adjustments through component-specific properties such as isDense, and through VisualDensity, which can be configured globally using ThemeData.visualDensity.

The new Material 3 Expressive density guidelines describe a component-scaling system using density levels starting at 0, with each negative step reducing component height by 4dp through adjustments to padding or dimensions.

While this is conceptually similar to Flutter's existing VisualDensity system, it is unclear how M3E component scaling is intended to be supported.

The existing M3E implementations appear to explicitly opt out of inheriting application-level density:

Both use VisualDensity.standard in their generated defaults, and PR #13084 includes a test explicitly verifying that ThemeData.visualDensity is ignored.

Although developers can override density through component-specific styles, this requires configuring each component family independently.

Questions

  1. Is there an existing plan for supporting M3E component scaling consistently across components?
  2. Should M3E components respect an explicitly configured application-level density, such as ThemeData.visualDensity, while retaining standard density as the default?
  3. Should a new, theme-level component-scaling API be introduced for M3E?

Related issue

Activity

  1. added
    p: material_ui
    package
    c: proposal
    team-design
    on Nov 4, 2026
  2. mbcorona commented on Nov 4, 2026

    @mbcorona
    Member

    HI @ChristopherMuir , routing this report as a proposal to the design team.

  3. QuncCccccc commented on Nov 4, 2026

    @QuncCccccc
    Contributor

    Thanks for raising this! Here's why the M3E components use VisualDensity.standard today, and what we plan to do.

    Why M3E ignores ThemeData.visualDensity today

    • The M3 density guidelines you linked also say not to apply component density by default (Avoid applying component scaling by default), and extra small and small buttons need a 48x48dp target.
    • ThemeData.visualDensity defaults to compact on desktop. If M3E components followed it, desktop apps would get denser buttons without asking for them. For example, an extra small button would shrink from 32dp to 24dp, and its tap target from 48dp to 40dp.

    For now, you can still set the density per component, for example with IconButtonThemeData(style: ButtonStyle(visualDensity: VisualDensity.compact)). I know it's a bit tedious, but it keeps the default in line with the Material guidelines, which say density should be opt-in.

    About your questions:

    1. Not yet, but here's the direction. After the components are migrated, we plan to add ThemeData.variant, the same flag as the variant in each M3E component theme, to turn on M3E for all components. When it's on, ThemeData.visualDensity would default to standard on every platform, and M3E components would read ThemeData.visualDensity instead of hardcoding standard. Then developers can set the density globally with ThemeData.visualDensity, instead of in each component theme. Apps that don't turn on M3E keep today's defaults.
    2. Yes. Once ThemeData.variant turns on M3E, you can set ThemeData.visualDensity once and every M3E component will follow it. If you don't set it, the default stays standard. Until then, components that turn on M3E one by one keep using standard, because ThemeData.visualDensity still defaults to compact on desktop, and we can't tell whether the app set it.
    3. No new API should be needed. VisualDensity already uses 4dp steps, which match the M3 density scale (0, -1, -2, ...).

    What do you think?

  4. added
    P3
    triaged-design
    on Nov 10, 2026
  5. ChristopherMuir commented on Nov 17, 2026

    @ChristopherMuir
    Author

    Hi @QuncCccccc That pretty much answers my questions; and I agree the plan does fufill the guidelines.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3c: proposalp: material_uipackageteam-designtriaged-design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions