Logo

K-Learn

Flutter Icon Widget

< Previous Next >

The "Icon" widget is used to display vector icons. It is a simple, reusable widget that can be easily customized and styled using various properties.

Here is an example of how to use the Icon widget in Flutter:

Icon(
  Icons.favorite,
  color: Colors.red,
  size: 48.0,
)

Some of the commonly used properties of the Icon widget are:

Icons: The icon that should be displayed. This can be any of the built-in icons provided by Flutter, or a custom icon.
color: The color of the icon. This can be set to any color using the Color class.
size: The size of the icon, specified as a double value.

In addition to these properties, the Icon widget also has many other properties that can be used to customize the appearance and behavior of the icon, such as semanticLabeltextDirectioniconSize, and many more.

Output:


< Previous Next >