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?
2
Answers
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.
you commented the debugShowCheckedModeBanner line,
remove the comment slashes. (//)