Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove slow mode tag in flutter app

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

like image 609
harsha20599 Avatar asked Mar 03 '18 19:03

harsha20599


2 Answers

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'),
    );
  }
}
like image 168
vbandrade Avatar answered Oct 20 '22 04:10

vbandrade


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'),
   );
  }
}
like image 2
Zakria Khan Avatar answered Oct 20 '22 05:10

Zakria Khan