Skip to content

Chip.iconTheme does not apply the icon theme #111828

@werainkhatri

Description

@werainkhatri

Steps to Reproduce

  1. Execute flutter run on the code sample

Expected results:
Screenshot 2022-09-18 at 2 41 32 AM

Actual results:
Screenshot 2022-09-18 at 2 41 50 AM

Code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    const IconThemeData iconThemeData = IconThemeData(
      color: Colors.red,
      size: 30,
      opacity: 0.6,
    );

    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      title: 'Material App',
      home: Scaffold(
        backgroundColor: Colors.blue,
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              const Chip(
                iconTheme: iconThemeData,
                avatar: Icon(Icons.ac_unit),
                label: Text('Chip'),
              ),
              ActionChip(
                iconTheme: iconThemeData,
                avatar: const Icon(Icons.ac_unit),
                label: const Text('ActionChip'),
                onPressed: () {},
              ),
              ChoiceChip(
                iconTheme: iconThemeData,
                avatar: const Icon(Icons.ac_unit),
                label: const Text('ChoiceChip'),
                selected: false,
                onSelected: (_) {},
              ),
              FilterChip(
                iconTheme: iconThemeData,
                avatar: const Icon(Icons.ac_unit),
                label: const Text('FilterChip'),
                onSelected: (_) {},
              ),
              InputChip(
                iconTheme: iconThemeData,
                avatar: const Icon(Icons.ac_unit),
                label: const Text('InputChip'),
                onPressed: () {},
              ),
            ],
          ),
        ),
      ),
    );
  }
}
Logs
[✓] Flutter (Channel stable, 3.3.2, on macOS 12.5.1 21G83 darwin-arm, locale en-IN)
    • Flutter version 3.3.2 on channel stable at /Users/werainkhatri/soft/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (3 days ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/werainkhatri/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.5.1 21G83 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.4Found to occur in 3.4frameworkflutter/packages/flutter repository. See also f: labels.has partial patchThere is a PR awaiting someone to take it across the finish linehas reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions