Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of Material Widget?

Tags:

flutter

dart

What is the use of Material widget in flutter? even though we can use the properties included in material inside a Material App. What is it's key use.

like image 847
Thashreef Mohammed Avatar asked Jan 07 '20 14:01

Thashreef Mohammed


1 Answers

The Material widget is responsible for:

  • Clipping: If clipBehavior is not Clip.none, Material clips its widget sub-tree to the shape specified by shape, type, and borderRadius. By default, clipBehavior is
    Clip.none for performance considerations.

  • Elevation: Material elevates its widget sub-tree on the Z-axis by elevation pixels, and draws the appropriate shadow.

  • Ink effects: Material shows ink effects implemented by InkFeatures like InkSplash and InkHighlight below its children.

For more information about Material Widget go through this link.

like image 104
Dhaval Kansara Avatar answered Oct 03 '22 04:10

Dhaval Kansara