Skip to content

How to use alternative themes of material icons #18384

@hvkale

Description

@hvkale

Google announced a bunch of updates to Material Guidelines during io2018. One of the updates is themes of material icons - https://material.io/tools/icons/
It now has "Filled", "Outlined", "Rounded", "Two-Tone", and "Sharp".

In Flutter, I know how to use regular icons which are "Filled" ones. I also know how I can add individual assets to the assets folder in Flutter app and use those in my code but I'd like if they were readily available so that you could use them like -

IconButton(
  icon: Icon(Icons.volume_up), // <=== Point of interest here
  tooltip: 'Increase volume by 10%',
  onPressed: () { setState(() { _volume *= 1.1; }); },
)

Looking at this repo I think it only supports default (Filled) right now but are there any plans to add other themes?

Probably

IconButton(
  icon: Icon(Icons.volume_up, theme: IconTheme.outlined), // <=== Example
  tooltip: 'Increase volume by 10%',
  onPressed: () { setState(() { _volume *= 1.1; }); },
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttercustomer: crowdAffects or could affect many people, though not necessarily a specific customer.f: 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