Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove the Flutter debug banner?

How can I remove the debug banner in Flutter?

I am using 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 message for profile and release mode.

like image 734
Tree Avatar asked Feb 20 '18 20:02

Tree


People also ask

What is debugShowCheckedModeBanner false in Flutter?

debugShowCheckedModeBanner property Null safety bool debugShowCheckedModeBanner. Turns on a little "DEBUG" banner in debug mode to indicate that the app is in debug mode. This is on by default (in debug mode), to turn it off, set the constructor argument to false.

What is debug print in Flutter?

DebugPrintCallback debugPrint. read / write. Prints a message to the console, which you can access using the "flutter" tool's "logs" command ("flutter logs"). See also: DebugPrintCallback, for function parameters and usage details.


2 Answers

On your MaterialApp set debugShowCheckedModeBanner to false.

MaterialApp(   debugShowCheckedModeBanner: false, ) 

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

like image 119
Rémi Rousselet Avatar answered Sep 22 '22 21:09

Rémi Rousselet


OUTDATED

  • If you are using Android Studio, you can find the option in the Flutter Inspector tab --> More Actions.

Android Studio

  • Or if you're using Dart DevTools, you can find the same button in the top right corner as well.

Dart DevTools

like image 35
tottomotto Avatar answered Sep 21 '22 21:09

tottomotto