What is the difference between runApp(new MyApp()) and runApp(new MaterialApp()) in flutter?

后端 未结 3 1645
春和景丽
春和景丽 2020-12-19 12:56

In flutter we can pass a stateless widget that returns a MaterialApp instance to the runApp() function like this:

void main()=>r         


        
3条回答
  •  [愿得一人]
    2020-12-19 13:17

    In one case you have a class, which you can add more methods to, and use them. In one case you don't.

提交回复
热议问题