Difference between Flutter MaterialApp and Material widget


Difference between Flutter MaterialApp and Material widget.

MaterialApp is used at the root of your app. It takes a lot of properties like theme, routes, initialRoutes, home....

There must be a MaterialApp in your app.

 MaterialApp(

        initialRoute: "/introduction",
        debugShowCheckedModeBanner: false,
        home: AppIntroductionScreen()
)        


Material

On the other hand, Material widget is a widget. It has some cool properties like child, shape, type...

Material(
  
  type: MaterialType.transparency,
  
  clipBehavior: Clip.hardEdge,
  
  shape: const CircleBorder(),
  
  child: InkWell(child: child)
  )        
Victoria Okumah

RN. Bsc.N. STATE SCHOOL OF NURSING, EKU, DELTA STATE. LADOKE AKINTOLA UNIVERSITY, OGBOMOSO, OYO STATE.

2 年

Sir please check your Facebook message

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了