Skip to content

☂️ Remove accentColor and accentTextTheme from ThemeData et al. #56918

@HansMuller

Description

@HansMuller

The following proposal is from the "Deprecate/remove the accent properties" section of flutter.dev/go/material-theme-system-updates.

The Material Design spec no longer includes a color called ‘accent’. The ‘secondary’ color scheme color is roughly equivalent. The overall theme’s accent properties are rarely used within Flutter itself. For example the accentIconTheme is only used by FloatingActionButton and in that case, it’s only used (in one expression) for the sake of backwards compatibility. The accentColorBrightness property is only used by GridTile. We plan to replace component dependencies on the accent properties with dependencies on component themes, and the overall theme’s color scheme and text theme.

Color accentColor;
Brightness accentColorBrightness;
TextTheme accentTextTheme;
IconThemeData accentIconTheme;

The process for removing these properties will take a considerable amount of time because they’ve been around since early versions of Flutter.

  1. Remove dependencies - but not definitions - from Flutter.
  2. When all of the accent properties dependencies have been removed, send a breaking change announcement.
  3. Deprecate the properties and constructor parameters.
  4. Remove the deprecated properties and constructor parameters.

accentColor

The following classes still depend on accentColor (checked items have been updated):

accentTextTheme

The following classes still depend on accentTextTheme (checked items have been updated):

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions