Reputation: 1198
The icon set contains the ruble currency, but if i try to add to the project i get error The getter 'currency_ruble' isn't defined for the type 'Icons'
IconButton(icon: Icon(Icons.currency_ruble))
flutter doctor
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19042.1348], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.62.3)
[√] Connected device (3 available)
Upvotes: 2
Views: 1033
Reputation: 1
I was using 2.8.1 which didn't have latest icons. Once I upgraded the version to 2.10.5 I was able to find the missing icons.
Upvotes: 0
Reputation: 340
encountered the same problem with a different icon. You can try either of the following:
Use this regularly updated material io package and see if your ruble currency appears: material_design_icons_flutter package
Upvotes: 1
Reputation: 39
There is no icons for "currency_ruble". Currencuy_ruble is not of type IconData. That's why it's showing error. If you want to use custom icon then use that icon by using Image.asset() if currency_ruble is of type image or SvgPicture.asset() if it's of type .svg
IconButton(onPressed: onPressed, icon: Image.asset("<image file name>"))
Upvotes: 0
Reputation: 1537
Flutter has a cached version of the app on the device . Run
flutter clean
in your app directory.
OR check whether material icon dependency is in pubspec.yaml or not:
flutter:
uses-material-design: true
Upvotes: 0