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.
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.
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.
On your MaterialApp
set debugShowCheckedModeBanner
to false
.
MaterialApp( debugShowCheckedModeBanner: false, )
The debug banner will also automatically be removed on release build.
OUTDATED
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With