How to Remove ʺDEBUGʺ Banner Tag From Debugging Flutter App

While you run your app in debug mode during testing your app, you will notice a "DEBUG" banner tag at top right side of your app. In this example, we are going to show you the way to remove this debug tag while debugging your Flutter App.

MaterialApp( 
      debugShowCheckedModeBanner: false,
)

You need to pass "False" on "debugShowCheckedModeBanner" in MaterialApp or CupertinoApp in Flutter.

import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp( 
      debugShowCheckedModeBanner: false,
      home: MyApp()
    )
  );
}

class MyApp extends StatefulWidget{
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
          appBar: AppBar(
              title:Text("Remove Debug Banner Tag"), //appbar title
              backgroundColor: Colors.redAccent //appbar background color
          ),
          body: Container(
            alignment:Alignment.topCenter,
            padding: EdgeInsets.all(35),
             child: Text("Remove Debug Banner Tag")
          )
      );
  }
}

Default Tag on Debug Mode When Banner Tag is Removed

In this way, you can remove "Debug" banner tag from the Flutter app while debugging. 

No any Comments on this Article


Please Wait...