This content originally appeared on CodeSource.io and was authored by Jatin Hemnani
In this article, you will learn How To Remove Debug Banner In Flutter.
Creating Material App
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner:false,
home: Scaffold(
appBar: AppBar(
title: Text('Home'),
centerTitle: true,
),
body: Center(
child: Text('Codesource.io'),
),
),
);
}
}
Here, you have a simple Material App with a Scaffold. To remove the debug banner there is a property in MaterialApp() which is debugShowCheckedModeBanner, it takes the boolean value, if you want to hide the banner just assign it to false.
Result


The post How To Remove Debug Banner In Flutter appeared first on CodeSource.io.
This content originally appeared on CodeSource.io and was authored by Jatin Hemnani
Jatin Hemnani | Sciencx (2021-02-28T17:46:29+00:00) How To Remove Debug Banner In Flutter. Retrieved from https://www.scien.cx/2021/02/28/how-to-remove-debug-banner-in-flutter/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.