You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As today, the way to set the icon in a specific material icons instance is to call a method:
mi.calendar
This approach is based on the special method_missing method from Ruby. At the beginning, I decided to use this approach as it simplifies the way you set the icon. However, I quickly noticed some drawbacks:
You miss real exceptions when calling methods that doesn't exist in that class. This may make more difficult to debug certain issues
There are icons that starts with a number, which it's invalid for ruby methods
As today, the way to set the icon in a specific material icons instance is to call a method:
This approach is based on the special
method_missing
method from Ruby. At the beginning, I decided to use this approach as it simplifies the way you set the icon. However, I quickly noticed some drawbacks:Now, checking the new PR to upgrade the gem to 4.0.0, I noticed many new icons starting with a number. For this reason, I plan to move from this approach to a specific method in v4.0.0.
Note this is a breaking change and already existing users would need to change their code:
The text was updated successfully, but these errors were encountered: