How to remove the debug banner in Flutter apps in development mode

Removing the debug banner in Flutter applications:

Flutter applications adds a banner on top right corner in Debug mode. The below image show a running Flutter app in an Android emulator:

Android emulator flutter debug

The red DEBUG label is the one we will remove.

This label is removed on production build, i.e. if you create the final APK for production, it will be removed.

debugShowCheckedModeBanner:

debugShowCheckedModeBanner flag takes a boolean value and this is used to show/hide the debug banner. You need to add it inside MaterialApp as false:

return MaterialApp(
      debugShowCheckedModeBanner: false,
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: Scaffold(
            appBar: AppBar(
                ....
                ....
                ....

This will remove that debug banner.

You might also like: