Show Material Style Design Icons in Flutter App Android iOS Example

Google provides us thousands of Material Style icons free for our mobile app and web apps. These icons are available on material.io website. The icons comes in SVG and PNG format with different sizes. Material icon collection is covers most of icons which is used by developers. Flutter comes with inbuilt material style icons implementation means there is no need to download icons from Material.io website. We can directly use Icons in our flutter app using flutter/src/widgets/icon.dart package. The package has a class named as Icon which can directly access all the icons. The Icon class has 5 different properties which can modify the icon in any style. So in this tutorial we would Show Material Style Design Icons in Flutter App Android iOS Example Tutorial.

Contents in this project Show Material Style Design Icons in Flutter App Android iOS Example Tutorial:

1. Import material.dart package in your app’s main.dart file.

2. Create void main runApp() method and here we would call our main Root MyApp class.

3. Create our main Root view class named as MyApp extends StatelessWidget.

4. Creating Widget build area in MyApp class. Now we would create Scaffold widget and than create a Center widget. We would also create Row widget in Center widget.

5. We would create 6 different type of Icons using Icon widget in Row widget. Here you would find all the icons list on Flutter Icons Class page. You can also see all the Icons list on Google’s Material Design Icons page.

  1. Icons.iconName : Is used to add Icon name.
  2. color : Used to set Icon filled color.
  3. size : Used to set Icon size. The default Icon size is 24 Pixels. If we do not define the Icon size then it will automatically the default Icon size.
  4. semanticLabel : It is used to set text which is announced in accessibility modes (e.g TalkBack / VoiceOver).

6. Complete source code for main.dart file:

Screenshot:

Show Material Style Design Icons in Flutter App Android iOS Example

Leave a Reply

Your email address will not be published.