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.
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