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.
Here are 3 ways to do it
1 :
On your MaterialApp set debugShowCheckedModeBanner to false.
MaterialApp(
debugShowCheckedModeBanner: false
)
The slow banner will also automatically be removed on release build.
2 : If you are using Android Studio, you can find the option in the Flutter Inspector tab --> More Actions.
3 : There is also another way for removing the "debug" banner from the flutter app. Now after new release there is no "debugShowCheckedModeBanner: false," code line in main. dart file. So I think these methods are effective:
--> If you are using VS Code, then install "Dart DevTools" from extensions. After installation, you can easily find "Dart DevTools" text icon at the bottom of VS Code. When you click on that text icon, a link will be open in google chrome. From that link page, you can easily remove the banner by just tapping on the banner icon as shown.
For more info: How_to_remove_debug_banner_in_flutter_on_android_emulator