[Breaking Change] Marking `IconData` class as `final`

246 views
Skip to first unread message

Daco Harkes

unread,
Jan 26, 2026, 1:19:30 PMJan 26
to Flutter Public Announcements (flutter-announce)
We are working on a generalized mechanism to bring tree-shaking of assets and native code to packages. The Icon Tree Shaker is one of the existing bespoke mechanisms to be folded into this general mechanism. The general mechanism will not support recording const instances in complex type hierarchies for understandability, locality, and performance reasons. Therefore, we want to mark the class IconData as final.

This will break code that implements or extends IconData.

Please let us know if you are impacted by this, and if you are able to migrate your code, by replying to the tracking bug https://github.com/flutter/flutter/issues/181342

When will the change happen?
Flutter 3.44 stable. On beta probably 3.43, we're holding off changes for now.

How to prepare for this change?
Follow the Flutter Framework pattern for icon sets: an abstract final class with static const instances of type IconData. For example packages/flutter/lib/src/cupertino/icons.dart



Reply all
Reply to author
Forward
0 new messages