Reputation: 305
I'm a bit confused about how Flutter icons work. I thought there would be a directory of images somewhere containing the icons (thought I do recognize there are thousands of them). The Icons class simply contains a large list of static constant IconData variables and has no methods. Any use of icon in widgets have the type IconData.
My questions is how do Icons really work under the hood? Where in the flutter engine can I see exactly what's happening to turn that IconData into an image/shape (I don't know how the rendering works either)? I have no doubt other Flutter Material Design features work in the same way Icons do, so understanding this will probably answer other questions I’ll have in the near future.
Upvotes: 1
Views: 194
Reputation: 44091
Icons are glyphs in a special MaterialIcons font. They are installed in the SDK with the tool as described in https://github.com/flutter/flutter/wiki/Updating-Material-Design-Fonts-&-Icons.
Upvotes: 3