Tree shaking requires @staticIconProvider annotation
Closed this issue · 1 comments
ltOgt commented
Had an issue where Font awesome icons were not reduced by tree shaking:
Turns out you need to add the @staticIconProvider
annotation
Compare
- flutters
Icons
with annotation: https://github.com/flutter/flutter/blob/e1e47221e86272429674bec4f1bd36acc4fc7b77/packages/flutter/lib/src/material/icons.dart#L153 - font awesomes
FontAwesomeIcons
without annotation:
font_awesome_flutter/util/lib/main.dart
Line 345 in 32beff2
michaelspiss commented
Hey @ltOgt, thanks for bringing this up! @staticIconProvider
will be available with the next release