How to remove the Flutter debug banner?

Tree picture Tree · Feb 20, 2018 · Viewed 127.2k times · Source

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.

Note that I get not supported for emulator messages for profile and release mode.

Answer

Rémi Rousselet picture Rémi Rousselet · Feb 20, 2018

On your MaterialApp set debugShowCheckedModeBanner to false.

MaterialApp(
  debugShowCheckedModeBanner: false,
)

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