How to remove debug banner in flutter on Android emulator?

How to remove debug banner in flutter?

I use a flutter screenshot and I would like the banner to not be on the screenshot. Now it has.

Please note that me not supported for emulator messages are not supported for emulator for profile and release mode.

+124
source share
28 answers

On your MaterialApp set debugShowCheckedModeBanner to false .

 MaterialApp( debugShowCheckedModeBanner: false ) 

A slow banner will also be automatically deleted during release build.

+259
source

In your class, in MaterialApp use for

debugShowCheckedModeBanner: false,

 ... return new MaterialApp( title: 'Flutter Test', debugShowCheckedModeBanner: false, home: new Column( ... ), builder: (BuildContext context, Widget child) { ... } ); ... 
+38
source
 MaterialApp( debugShowCheckedModeBanner: false ) 
+13
source

If you use IntelliJ IDEA, in the flutter inspector there is an option to disable it.

start a project

open the flutter inspector

hide slow banner

From the Flutter inspector, click or select "More Actions."

Flutter Inspector Image

When the menu appears, select "Hide Debug Mode Banner"

Hidden debug mode banner image

+12
source

Just set debugShowCheckedModeBanner: false to your MaterialApp.

Example from our TodoMVC application:

 class TodoApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter β€’ TodoMVC', debugShowCheckedModeBanner: false, theme: new ThemeData( fontFamily: 'Helvetica Neue', primarySwatch: Colors.blueGrey, ), home: new SplashPage(), routes: { '/todos': (BuildContext context) => new TodoList(), }, ); } } 
+5
source
  MaterialApp( debugShowCheckedModeBanner:false // Add this line ) 

// And run the application or restart

+4
source

Well, this is the simple answer you want.

 MaterialApp( debugShowCheckedModeBanner: false ) 

But if you want to delve into the application (you want the apk release (which does not have a debug banner) and if you use Android Studio, then go to

Run β†’ Flutter Run 'main.dart' in Relese mode

+4
source

If you are using Android Studio, you can find this option in the Flutter Inspector β†’ More Actions tab.

enter image description here

+3
source

if you want to remove it completely, use the dubugShowCheckedModeBanner: false property in your root widget. see example below

 class Application extends StatelessWidget{ @override Widget build(BuildContext context) { return MaterialApp( home : Scaffold( appBar: AppBar( title: Text('Booklar'), ), ), debugShowCheckedModeBanner: false, ); } } 
+2
source

you need to set debugShowCheckedModeBanner to false in the material widget

+2
source
 void main() { runApp(MaterialApp( title: 'My app', debugShowCheckedModeBanner: false, home: MyScaffold(), )); } 

Add debugShowCheckedModeBanner: false to remove

+2
source

There is also another way to remove a debug banner from a flutter application. Now after the new version in the main.dart file there is no "debugShowCheckedModeBanner: false," . Therefore, I think these methods are effective:

  1. If you are using VS Code, install "Dart DevTools" from the extensions. After installation, you can easily find the "Dart DevTools" text icon at the bottom of VS Code. When you click on this text icon, a link will open in Google Chrome. From this link page, you can easily remove the banner by simply clicking on the banner icon, as shown in this screenshot .

NOTE: - Dart DevTools is an extension of the Dart language debugger in VS Code

  1. If Dart DevTools already installed in your VS code, you can directly open Google Chrome and open this URL = "127.0.0.1:ZZZZZ/?hide=debugger&port=XXXXX"

NOTE. - In this link, replace "XXXXX" with the 5-digit port identifier (on which your flutter application is running), which will change every time you use the "flutter run" command and replace "ZZZZZ" with a global one (immutable). 5-digit debugger identifier

NOTE: - these dart developer tools are for the Google Chrome browser only.

+2
source

Usually inside the main.dart file is MaterialApp,

debugShowCheckedModeBanner: false

And run your application? Here it is, the problem is solved!

+1
source

debugShowCheckedModeBanner: false

 class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: Constants.APPTITLE, theme: new ThemeData( primaryColor: Colors.pink ), debugShowCheckedModeBanner: false, home: new Home(), ); } } 
+1
source

Add the debugShowCheckedModeBanner property to your application and set it to false.

debugShowCheckedModeBanner: false,

+1
source

Inside your MaterialApp use the property:

  debugShowCheckedModeBanner : false 

This is it. Then reload and the banner will be removed. This is true by default, but it will be automatically deleted in the release.

0
source

You can set the debugShowCheckedModeBanner property to false to remove the debug banner.

 void main() => runApp( MaterialApp( debugShowCheckedModeBanner: false, home: SplashPage() )); 
0
source

In main.dart set debugShowCheckedModeBanner: false

0
source

Set the debugShowCheckedModeBanner property of the MaterialApp object to false, which is true by default.

https://api.flutter.dev/flutter/material/MaterialApp/debugShowCheckedModeBanner.html

0
source

Just set debugShowCheckedModeBanner: false in your MaterialApp.

Done!

enter image description here

 void main(){ runApp(new MyApp()); } class MyApp extends StatefulWidget { @override _MyAppState createState() => new _MyAppState(); } class _MyAppState extends State<MyApp> { // This widget is the root of your application. @override Widget build(BuildContext context) { return new MaterialApp( title: new Text('My Application'), debugShowCheckedModeBanner: false, // Add this line* theme: new ThemeData( primarySwatch: Colors.blue, ), home: new Container(), ); } } 

Note. Add comment line code

.This line allows you to hide the banner "Slow mode" or "Debug" by default in the upper right corner of the emulator.

See: http://www.leutbounpaseuth.me/flutter/hide-debug-banner/

0
source

debugShowCheckedModeBanner: false

inside the MaterialApp () widget

I think this may help.

0
source

On your MaterialApp ()

 MaterialApp( debugShowCheckedModeBanner: false ) 
0
source

Below the MaterialApp widget is the debugShowMaterialGrid attribute . Set to false. Example:

  Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', debugShowMaterialGrid: false, ) } 

Hope this helps.

-1
source
 MaterialApp( home: Scaffold( debugShowCheckedModeBanner: false, ); 

This will remove the debug banner, but this banner will only be displayed if the application is running on the emulator or on a real device after the Real Build Banner automatically deletes. Hope this was helpful to you.

-1
source

If you want to debug your application in flutter and only hide the tape, set the debugShowCheckedModeBanner property to Material Widget.

In your MaterialApp call, set the following:

 MaterialApp( debugShowCheckedModeBanner: false, ); 

or on the command line:

flutter --release

Example:

  class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return new MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter', home: new MyHomePage(title: 'Home Page'), ); } } 
-1
source
 import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(), ); } } 
-1
source

It's quite simple, just run the command "flutter run --release" in the terminal or create a release version of your application and install it. This is what I do when I want to run it in Android.

-1
source

just set the value of the debugShowCheckedModeBanner attribute inside the MaterialApp widget to false debugShowCheckedModeBanner: false

-1
source

Source: https://habr.com/ru/post/1275473/


All Articles