Skip to main content

Flutter Remove Debug Banner From App

Debug banner is a small banner image shows at the top right side of flutter debug app. If you are running app in debug mode then you can see this banner. If you make production build of your flutter project then this banner will automatically hide form the screen.

Flutter Remove Debug Banner From App:

1. To remove debug banner from app screen we have to add debugShowCheckedModeBanner with property false on our MaterialApp Root widget.
debugShowCheckedModeBanner: false,

2. Source code for main.dart file after removing banner:

import 'package:flutter/material.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
        debugShowCheckedModeBanner: false,
        home: Scaffold(
            body: Center(
          child: Text(
            'Flutter Debug Banner Remove',
            style: TextStyle(fontSize: 28),
          ),
        )));
  }
}
Screenshot:
Flutter Remove Debug Banner From App

Comments