Rahul Kumar
Code Rinse

Code Rinse

आइकन विजेट (Icon Widget)

आइकन विजेट (Icon Widget)

Rahul Kumar's photo
Rahul Kumar
·May 31, 2022·

1 min read

According to the official documentation,

Icon is a graphical icon widget drawn with a glyph from a font

  • Widget example
  • Theme based values
    • Material app
    • IconTheme
  • Why directionality
  • IconData
    • What happens when we remove use-material-design
    • Trying out other IconData
  • Improvement
    • Multicolour icons
    • Non-square Icons

Let's see how to create a simple icon Widget

1.jpg

Icon size can be changed but they are always going to remain square. Let's add size to the above icon widget

Icon(
    Icons.favorite,
    size: 96,
)

1.jpg

Icon color can be changed but there can be only single color. There are ways you can use shader to color your icons in different texture but that is beyond the scope of this article.

 
Share this