Home > Mobile >  Dart Flutter display Icons
Dart Flutter display Icons

Time:03-20

Im writing my first code and I want to display a Icon, and I try to use the command Icon (Icons.star, color: Colors.red, size: 100, ),. But it doesn't work. Can somebody help me. Thx

CodePudding user response:

Welcome to Stackoverflow. Try the following code. Your above code is also correct.

Try to check below line in your pubspec.yaml file

flutter:
  uses-material-design: true

Refer image

You can also test the code on Dartpad.

  • Related