Skip to main content

Command Palette

Search for a command to run...

Removing debug banner in flutter

Updated
1 min read

Debug banner is a label given on a application when in development mode. It indecate that it is in debug mode or is beta phase. It can be eyecaughting for some developers and can be irretation for the developers to further moving on to the development phases. So some developers remove it from the application.

Here is the syntax of how you can remove it from the flutter application.

runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false // syntax
...

For example:

import 'package:flutter/material.dart';
void main() {
  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
        home: Scaffold(
          appBar: AppBar(
            backgroundColor: Colors.green,
            title: Center(child: Text('CodeNepal')),
      ),
          body: Text('Hello'),
    )),
  );
}

More from this blog

CodeFlutter

9 posts