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:
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:
- How to create a horizontal set of toggle buttons in flutter
- Different ways to create a GridView in Flutter
- TextField widget example in flutter and its different properties
- How to get user input text from a TextField in Flutter
- How to customize the textfield cursor in Flutter
- Flutter TextField how to change the maximum and minimum lines