Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.16 KB

ex7-6.md

File metadata and controls

37 lines (29 loc) · 1.16 KB

7.6 Removing the Flutter Debug banner

Example Code:

The code provided defines a Flutter application with a MaterialApp widget.

The debugShowMaterialGrid and debugShowCheckedModeBanner properties are used to control the visibility of debugging tools in Flutter. The debugShowMaterialGrid property controls the visibility of the material grid, which is a grid that is used to help developers align widgets. The debugShowCheckedModeBanner property controls the visibility of the debug banner, which is a banner that is displayed at the top of the screen when the application is running in debug mode.

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final appTitle = 'Cert In';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: appTitle,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        textTheme: GoogleFonts.montserratTextTheme(),
      ),
      debugShowMaterialGrid: false,
      debugShowCheckedModeBanner: false,
      home: Professional(title: appTitle),
    );
  }
}