Flutter – Material Package
Material Package contains the application icon and a lot of designing tool methods. In this package we don’t need to write the whole code for the particular function or method, we just import this package and use it single line.
How to Install The Material Package
For installing the packages we have to follow a few steps:
Step 1: Search About The Package
Suppose we want to use the package then we simply go to google and search for this function that which package is required and you get the name of the package. Now you go to flutter official website pub.dev and search for the material and you get the material packages.
Step 2: Install Material Package
Now you just go to the install section and use the package library in your code and for using the that we have two methods to use the library:
Method 1: You get the line in the installing section you just copy the line and paste it on your command and run it with flutter,
$ flutter pub add material
Method 2: Copy the given below dependencies and paste them in your code pubsec.yaml section under the Cupertino dependencies and tap on the pub.get section and import the material.dart in your home:
Import this line in your home section:
Example: Card App Using Flutter
Use the network image in the circle Avatar.
Note: Always use the latest and most stable version of the packages.
Please Login to comment...