Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debugShowCheckedModeBanner Not remove debugShowCheckedModeBanner:false

I'm trying to remove the debug banner from my application and I added debugShowCheckedModeBanner: false in my main.dart and every activity but still showing the debug banner.

Main.dart

import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:intrackapp/login/splash_screen.dart';
import 'package:khalti_flutter/khalti_flutter.dart';
import 'login/firebase_options.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );

  runApp( MyApp());
}

class MyApp extends StatelessWidget {
  final usernameController = TextEditingController();
  final passwordController = TextEditingController();
  MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
     return KhaltiScope(
       publicKey: "test_public_key_6ddec90a98d44awe4d84e2c58fc172490a",
       builder: (context, navKey) {
         return MaterialApp(
          // debugShowCheckedModeBanner: false,
           navigatorKey: navKey,
           localizationsDelegates: const[KhaltiLocalizations.delegate],
           theme: ThemeData(
             primaryColor: Colors.grey, // Set default color to blue
           ),

               debugShowCheckedModeBanner: false,
               home: SplashScreen(),
         );
       }
     );
  }
}

The major issue is debugShowCheckedModeBanner: false is not removing the debug banner because the debug banner shows on every page. How to remove the debug banner?

like image 669
Om ghimire Avatar asked Aug 25 '26 04:08

Om ghimire


2 Answers

you commented the debugShowCheckedModeBanner line, remove the comment slashes. (//)

like image 153
Vivek Chib Avatar answered Aug 27 '26 18:08

Vivek Chib


If you are use the MaterialApp widget in all app screen so please make sure in all screen widget debugShowCheckedModeBanner is true or false.

If it's true so please set the false of debugShowCheckedModeBanner.

like image 35
Dheeraj Prajapat Avatar answered Aug 27 '26 19:08

Dheeraj Prajapat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!