How to remove the Flutter debug banner?

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

    On your MaterialApp set debugShowCheckedModeBanner to false.

    MaterialApp(
      debugShowCheckedModeBanner: false,
    )
    

    The debug banner will also automatically be removed on release build.

提交回复
热议问题