Sunday 7 March 2021

This application cannot tree shake icons fonts. Flutter build error for android deployment

I'm building my flutter and firebase application for android and am currently getting the error This application cannot tree shake icons fonts. I have been looking at some other questions like this one. However, one of the suggestions, using --no-tree-shake-icons, doesn't work as when the app is built, none of the icons I have used show up. The other suggestion is to add const before IconDate but I cant figure out how to do this as most of my icons are declared as:

icon: Icon(Icons.home),

or

iconData: IconData(document.data()['ref'], fontFamily: 'MaterialIcons')

If anyone would be able to assist in showing me how to add const or how this issue can be resolved, I would really appreciate it!



from This application cannot tree shake icons fonts. Flutter build error for android deployment

No comments:

Post a Comment