How to remove slow mode tag in flutter app

5.7k views Asked by At

I've started flutter app development. My question is, how can I remove the slow load banner in the flutter app. I've used the Material widget (not MaterialApp) where it doesn't contain that debugShowCheckedModeBanner property. Is there any possible way to get rid of that banner on my device screen? A screenshot containing the slow load banner

2

There are 2 answers

0
Zakria Khan On

Flutter App Shows Slow Mode When debugShowCheckedModeBanner is set to true which is by default true.

debugShowCheckedModeBanner: true,

if want to remove the slow mode or debug banner from your app then you need to make the above function flash.

the reason for slow mode banner is that in debug mode app is running slowly.

Debug mode on device (including simulators, emulators): Turns on all the assertions in the world, includes all debugging information, enables all the debugger aids (e.g. observatory) and service extensions. Optimizes for fast develop/run cycles. Does not optimize for execution speed, binary size, or deployment. Used by flutter run. Built with sky/tools/gn --android or sky/tools/gn --ios. Also sometimes called "checked mode" or "slow mode".

complete code

class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
   return new MaterialApp(
    debugShowCheckedModeBanner: false,
    title: 'Flutter Demo',
    home: new MyHomePage(title: 'Flutter Demo Home Page'),
   );
  }
}
1
vbandrade On

in the command line:

flutter run --release

if you want to debug and only hide the ribbon, set the debugShowCheckedModeBanner property of Material Widget

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      home: new MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}