How to remove the Flutter debug banner?

前端 未结 12 627
死守一世寂寞
死守一世寂寞 2020-12-07 11:13

How to remove the debug banner in Flutter?

I am using a flutter screenshot and I would like the screenshot not to have a banner. Now it does have.

12条回答
  •  时光取名叫无心
    2020-12-07 11:26

    To remove the flutter debug banner, there are several possibilities :

    1- The first one is to use the debugShowCheckModeBanner property in your MaterialApp widget .

    Code :

    MaterialApp(
      debugShowCheckedModeBanner: false,
    ) 
    

    And then do a hot reload.

    2-The second possibility is to hide debug mode banner in Flutter Inspector if you use Android Studio or IntelliJ IDEA .

    3- The third possibility is to use Dart DevTools .

提交回复
热议问题