How to remove the debug banner in flutter app?

How to remove debug banner in flutter?

Also I get message not supported for emulator in release mode.

You need to set debugShowCheckedModeBanner to false in your material app widget.

3 Likes

@ashish173 is right, you need to set debugShowCheckedModeBanner to false on your MaterialApp as follows:

return new MaterialApp( 
    home: new LoginPage(),
    debugShowCheckedModeBanner: false, 
    theme: new ThemeData( primarySwatch: Colors.green, ));

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

3 Likes

In your main.dart file below MaterialApp type
debugShowCheckedModeBanner: false,

2 Likes

This is simple!
C:\flutter\packages\flutter\lib\src\material (Navigate to your flutter sdk folder)
Open the app.dart file and scroll down to “this.debugShowCheckedModeBanner” and set it to false.

Appreciate your response.
But it is not recommended to modify framework code when it can be achieved from a property that is exposed by the framework.
debugShowCheckedModeBanner

1 Like