title: Hot reload was rejected: Const class cannot become non-const
body: <blockquote>
  <p>I want to remove debug banner and top bar with battery level and wifi
  icons. but it displays an error. where should I correct my code? here
  I have included my main. dart and home. dart.</p>
  <p>error&gt;&gt; Hot reload was rejected: Const class cannot become non-const:
  Library:'package:groceries_app/main.dart' Class: MyApp. Try performing
  a hot restart instead.</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/ULiRM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ULiRM.png" alt="enter image description here" /></a></p>
  <blockquote>
  <p>main.dart</p>
  </blockquote>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  import 'package:groceries_app/home.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
  
    Widget build(BuildContext context) {
      SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
          statusBarColor: Colors.transparent));
      return MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Groceries App',
        home: HomePage(),
      );
    }
  }
  </code></pre>
  <blockquote>
  <p>home.dart</p>
  </blockquote>
  <pre><code>import 'package:flutter/material.dart';
  
  class HomePage extends StatefulWidget{
    @override
    _HomePageState createState() =&gt; _HomePageState();}
  
  class _HomePageState extends State &lt;HomePage&gt;{
    @override
    Widget build (BuildContext context){
      return Scaffold(
        body: Center(
          child: Text(&quot;Home Page&quot;),
        ),
      );
    }
  }
  </code></pre>