How to remove the Flutter debug banner?

前端 未结 12 631
死守一世寂寞
死守一世寂寞 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:35

    The debug banner appears only while in development and is automatically removed in the release build.

    To hide this there is a need to set debugShowCheckedModeBanner to false

    MaterialApp(
      debugShowCheckedModeBanner: false,
    )
    

提交回复
热议问题